From: Jānis Rūcis Date: Tue, 30 Mar 2010 12:53:20 +0000 (+0300) Subject: IRC: split ProcessMessages into ProcessAllMessages and ProcessMessage X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=73938ac3c7e940536d6e2747ac3263308b7704e0;p=xonotic%2Fdarkplaces.git IRC: split ProcessMessages into ProcessAllMessages and ProcessMessage --- diff --git a/irc.c b/irc.c index c3d2cc92..151e1d81 100644 --- a/irc.c +++ b/irc.c @@ -115,7 +115,12 @@ static void IRC_IRC_f(void) Con_Print("[IRC] Not connected to a server.\n"); } -static void IRC_ProcessMessages(void) +static void IRC_ProcessMessage(const char *msg) +{ + Con_Printf("[IRC} %s\n", msg); +} + +static void IRC_ProcessAllMessages(void) { char *remaining = irc_incoming; int remaining_len = irc_incoming_len; @@ -139,7 +144,7 @@ static void IRC_ProcessMessages(void) if (nl != remaining && nl[-1] == '\r') nl[-1] = 0; - Con_Printf("[IRC] %s\n", remaining); + IRC_ProcessMessage(remaining); len = (nl - remaining) + 1; remaining += len; @@ -160,7 +165,7 @@ static void IRC_ReadMessages(void) { Con_Printf("[IRC] Read %d bytes\n", read); irc_incoming_len += read; - IRC_ProcessMessages(); + IRC_ProcessAllMessages(); } }