// HACK: Static server entry\r
// UCC (University [of Western Australia] Computer Club) IRC Server\r
gWindow_Status.Server = Server_Connect( "UCC", "130.95.13.18", 6667 );\r
+// gWindow_Status.Server = Server_Connect( "Freenode", "89.16.176.16", 6667 );\r
// gWindow_Status.Server = Server_Connect( "Host", "10.0.2.2", 6667 );\r
// gWindow_Status.Server = Server_Connect( "BitlBee", "192.168.1.34", 6667 );\r
\r
int pos = SetCursorPos(giTerminal_Height-2, 0);\r
#if 1\r
if( win == gpCurrentWindow ) {\r
+ int prefixlen = strlen(Source) + 3;\r
+ int avail = giTerminal_Width - prefixlen;\r
+ int msglen = strlen(Message);\r
printf("\x1B[T"); // Scroll down 1 (free space below)\r
- printf("[%s] %s\n", Source, Message);\r
+ printf("[%s] %.*s\n", Source, avail, Message);\r
+ while( msglen > avail ) {\r
+ msglen -= avail;\r
+ printf("\x1B[T");\r
+ SetCursorPos(giTerminal_Height-2, prefixlen);\r
+ printf("%.*s\n", avail, Message);\r
+ }\r
}\r
#else\r
if(win->Name[0])\r
\r
while(done < msglen) {\r
done += printf("%.*s", line_avail, msg->Data+done);\r
- SetCursorPos(y+i, prefix_len);\r
i ++;\r
+ SetCursorPos(y+i, prefix_len);\r
}\r
}\r
\r
{\r
int pos = 0;\r
char *ident, *cmd;\r
- \r
+\r
+ _SysDebug("Server %s: Line = %s", Server->Name, Line); \r
\r
// Message?\r
if( *Line == ':' )\r
{\r
case 353: // /NAMES list\r
// <user> = <channel> :list\r
- GetValue(Line, &pos); // '='\r
+// GetValue(Line, &pos); // '='\r
user = GetValue(Line, &pos); // Actually channel\r
message = Line + pos + 1; // List\r
- Message_Append(Server, MSG_TYPE_SERVER, user, "", message);\r
+ Message_AppendF(Server, MSG_TYPE_SERVER, user, "", "Names: %s", message);\r
break;\r
case 366: // end of /NAMES list\r
-// Message_Append()\r
+ // <user> <channel> :msg\r
+ user = message;\r
+ message = Line + pos + 1;\r
+ Message_Append(Server, MSG_TYPE_SERVER, user, "", message);\r
break;\r
case 372: // MOTD Data\r
case 376: // MOTD End\r
else {\r
message = GetValue(Line, &pos);\r
}\r
- Cmd_PRIVMSG(Server, dest, ident, message);\r
+// Cmd_PRIVMSG(Server, dest, ident, message);\r
Message_Append(Server, MSG_TYPE_STANDARD, ident, dest, message);\r
}\r
else if( strcmp(cmd, "JOIN" ) == 0 )\r