From: Anselm R Garbe Date: Fri, 30 Oct 2009 09:34:59 +0000 (+0000) Subject: applied clamiax' patch for null messages X-Git-Url: https://git.armaanb.net/logo/diff/svg2img?p=sic.git;a=commitdiff_plain;h=9c7027fcbf86f3082bf0609a7784cc6f6cfa87c7 applied clamiax' patch for null messages --- diff --git a/sic.c b/sic.c index 358fd81..424ce4f 100644 --- 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; }