sic

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

commit 4e3786f0cadc30cdca3d268f597c3cdb821d0309
parent 03aa190e8285ca90615981ce5afff41b8892a316
Author: arg@10ksloc.org <unknown>
Date:   Wed, 19 Jul 2006 11:15:49 +0200

corrected /m

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

diff --git a/sic.c b/sic.c @@ -77,6 +77,9 @@ parsein(char *msg) if((p = strchr(&msg[3], ' '))) *(p++) = 0; switch (msg[1]) { + default: + snprintf(bufout, sizeof(bufout), "%s\r\n", &msg[1]); + break; case 'j': if(msg[3] == '#') snprintf(bufout, sizeof(bufout), "JOIN %s\r\n", &msg[3]); @@ -93,17 +96,13 @@ parsein(char *msg) break; case 'm': privmsg(&msg[3], p); - break; + return; case 's': strncpy(channel, &msg[3], sizeof(channel)); return; - break; case 't': snprintf(bufout, sizeof(bufout), "TOPIC %s :%s\r\n", &msg[3], p); break; - default: - snprintf(bufout, sizeof(bufout), "%s\r\n", &msg[1]); - break; } write(srv, bufout, strlen(bufout)); }