sic

simple irc client
git clone git://git.suckless.org/sic
Log | Files | Refs | README | LICENSE

commit 9c7027fcbf86f3082bf0609a7784cc6f6cfa87c7
parent 7f1961d4c6c5e326fcb588785f1935e4176a2d01
Author: Anselm R Garbe <garbeam@gmail.com>
Date:   Fri, 30 Oct 2009 09:34:59 +0000

applied clamiax' patch for null messages
Diffstat:
sic.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 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; }