changeset: 47:d0f27dc8e4ba
tag: tip
user: nion_AT_h4447.serverkompetenz.net
date: Thu Feb 01 11:04:47 2007 +0100
files: ii.c
description:
use TOK_CMD more safely
diff -r 98d4cdb2f350 -r d0f27dc8e4ba ii.c
--- a/ii.c Thu Feb 01 10:59:36 2007 +0100
+++ b/ii.c Thu Feb 01 11:04:47 2007 +0100
@@ -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))
Received on Thu Feb 01 2007 - 11:10:03 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:49 UTC