I believe I have fixed the issue, why sic didn't handled PINGs correctly

This commit is contained in:
arg@suckless.org 2007-02-13 16:06:28 +01:00
parent bcda402396
commit 7ef7529687

7
sic.c
View File

@ -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 */
cmd = msg;
else {
if(!(p = strchr(msg, ' ')))
return;
usr = msg + 1;
*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;