]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
IRC: split ProcessMessages into ProcessAllMessages and ProcessMessage
authorJānis Rūcis <parasti@gmail.com>
Tue, 30 Mar 2010 12:53:20 +0000 (15:53 +0300)
committernitroxis <nitroxis@wtwrp.de>
Fri, 10 Jan 2014 19:32:33 +0000 (20:32 +0100)
irc.c

diff --git a/irc.c b/irc.c
index c3d2cc928836ae3e56068889b9896a8af1e73bca..151e1d810d1958164a0f9e9ac0ccb057976c1f45 100644 (file)
--- 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();
        }
 }