sic

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

commit 03aa190e8285ca90615981ce5afff41b8892a316
parent d515773fc609b71c0b18c87a6c81f1e19ea54af5
Author: arg@wmii.de <unknown>
Date:   Wed, 19 Jul 2006 08:53:38 +0200

implemented /s

Diffstat:
Msic.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sic.c b/sic.c @@ -70,10 +70,8 @@ parsein(char *msg) { char *p; - if((p = strchr(msg, ' '))) - *(p++) = 0; - if(msg[0] != '/' && msg[0] != 0) { - privmsg(channel, p); + if(msg[0] != '/') { + privmsg(channel, msg); return; } if((p = strchr(&msg[3], ' '))) @@ -94,10 +92,11 @@ parsein(char *msg) snprintf(bufout, sizeof(bufout), "PART %s :sic\r\n", &msg[3]); break; case 'm': - privmsg(msg, p); + privmsg(&msg[3], p); break; case 's': - strncpy(channel, msg, sizeof(channel)); + strncpy(channel, &msg[3], sizeof(channel)); + return; break; case 't': snprintf(bufout, sizeof(bufout), "TOPIC %s :%s\r\n", &msg[3], p);