ii

irc it, simple FIFO based irc client
git clone git://git.suckless.org/ii
Log | Files | Refs | README | LICENSE

commit e1af846735f8a7ff7acfd9ddacb7cfd8e494a998
parent 62963ef5b632876aa8604c83980ab27ddf911f4d
Author: nion@h4447.serverkompetenz.net <unknown>
Date:   Thu,  1 Feb 2007 11:04:47 +0100

use TOK_CMD more safely
Diffstat:
Mii.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ii.c b/ii.c @@ -351,7 +351,7 @@ static void proc_server_cmd(char *buf) { } else if(!strncmp("PART", argv[TOK_CMD], 5)) { snprintf(message, PIPE_BUF, "-!- %s(%s) has left %s", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_CHAN]); } else if(!strncmp("MODE", argv[TOK_CMD], 5)) - snprintf(message, PIPE_BUF, "-!- %s changed mode/%s -> %s %s", argv[TOK_NICKSRV], argv[TOK_CMD + 1], argv[TOK_CMD + 2], argv[TOK_CMD + 3]); + snprintf(message, PIPE_BUF, "-!- %s changed mode/%s -> %s %s", argv[TOK_NICKSRV], argv[TOK_CMD + 1] ? argv[TOK_CMD + 1] : "" , argv[TOK_CMD + 2]? argv[TOK_CMD + 2] : "", argv[TOK_CMD + 3] ? argv[TOK_CMD + 3] : ""); else if(!strncmp("QUIT", argv[TOK_CMD], 5)) snprintf(message, PIPE_BUF, "-!- %s(%s) has quit \"%s\"", argv[TOK_NICKSRV], argv[TOK_USER], argv[TOK_TEXT] ? argv[TOK_TEXT] : ""); else if(!strncmp("NICK", argv[TOK_CMD], 5))