sic

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

commit 7ef7529687d3e15aee3fe7fb6e6dceb3027ffd92
parent bcda402396cb7691e60a2be01c5ba067f9fb27ee
Author: arg@suckless.org <unknown>
Date:   Tue, 13 Feb 2007 16:06:28 +0100

I believe I have fixed the issue, why sic didn't handled PINGs correctly
Diffstat:
Msic.c | 17++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/sic.c b/sic.c @@ -110,17 +110,20 @@ parsesrv(char *msg) { char *chan, *cmd, *p, *txt, *usr; txt = NULL; + usr = host; if(!msg || !(*msg)) return; if(msg[0] != ':') - return; /* don't handle prefix-less server commands */ - if(!(p = strchr(msg, ' '))) - return; - usr = msg + 1; - *p = 0; - cmd = ++p; - if((p = strchr(usr, '!'))) + cmd = msg; + else { + if(!(p = strchr(msg, ' '))) + return; *p = 0; + usr = msg + 1; + cmd = ++p; + if((p = strchr(usr, '!'))) + *p = 0; + } for(p = cmd; *p; p++) /* remove CRLFs */ if(*p == '\r' || *p == '\n') *p = 0;