]> git.armaanb.net Git - sic.git/commitdiff
applied clamiax' patch for null messages
authorAnselm R Garbe <garbeam@gmail.com>
Fri, 30 Oct 2009 09:34:59 +0000 (09:34 +0000)
committerAnselm R Garbe <garbeam@gmail.com>
Fri, 30 Oct 2009 09:34:59 +0000 (09:34 +0000)
sic.c

diff --git a/sic.c b/sic.c
index 358fd81c01f0d363e5e6a0e2e93fe62646c01133..424ce4f16b01829afde94d423730355af09034e6 100644 (file)
--- a/sic.c
+++ b/sic.c
@@ -73,9 +73,8 @@ parsein(char *msg) {
                snprintf(bufout, sizeof bufout, "JOIN %s\r\n", msg + 3);
        else if(strncmp(msg + 1, "l ", 2) == 0)
                snprintf(bufout, sizeof bufout, "PART %s :sic - 250 LOC are too much!\r\n", msg + 3);
-       else if(strncmp(msg + 1, "m ", 2) == 0) {
-               if((p = strchr(msg + 3, ' ')))
-                       *(p++) = '\0';
+       else if(strncmp(msg + 1, "m ", 2) == 0 && (p = strchr(msg + 3, ' '))) {
+               *(p++) = '\0';
                privmsg(msg + 3, p);
                return;
        }