changeset: 84:4d27af581d96
tag: tip
user: arg_AT_suckless.org
date: Tue Feb 13 16:06:28 2007 +0100
summary: I believe I have fixed the issue, why sic didn't handled PINGs correctly
diff -r 85cdf6df6382 -r 4d27af581d96 sic.c
--- a/sic.c Fri Feb 09 17:07:29 2007 +0100
+++ b/sic.c Tue Feb 13 16:06:28 2007 +0100
@@ -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, '!')))
- *p = 0;
+ 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;
Received on Tue Feb 13 2007 - 16:06:40 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:16 UTC