small fix - sic - simple irc client | |
git clone git://git.suckless.org/sic | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 1f1228547cbfa796a84d8e461fff09ac8f50752d | |
parent ea71b6e88e385304013567869de7dc626194eb90 | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Thu, 8 Feb 2007 15:10:10 +0100 | |
small fix | |
Diffstat: | |
M sic.c | 7 +++---- | |
1 file changed, 3 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/sic.c b/sic.c | |
@@ -105,15 +105,14 @@ parsesrv(char *msg) { | |
if(!(p = strchr(msg, ' '))) | |
return; | |
*p = 0; | |
- for(++p; *p == ' '; p++); | |
- cmd = p; | |
usr = &msg[1]; | |
- if((p = strchr(msg, '!'))) | |
+ cmd = ++p; | |
+ if((p = strchr(usr, '!'))) | |
*p = 0; | |
} else | |
cmd = msg; | |
/* remove CRLFs */ | |
- for(p = cmd; p && *p != 0; p++) | |
+ for(p = cmd; *p; p++) | |
if(*p == '\r' || *p == '\n') | |
*p = 0; | |
if(!strncmp("PONG", cmd, 4)) |