From 8ddf2c52159ce786762040b546428db2f022f212 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C4=81nis=20R=C5=ABcis?= Date: Tue, 30 Mar 2010 15:53:20 +0300 Subject: [PATCH] IRC: split ProcessMessages into ProcessAllMessages and ProcessMessage --- irc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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(); } } -- 2.39.2