use TOK_CMD more safely
This commit is contained in:
parent
62963ef5b6
commit
e1af846735
2
ii.c
2
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))
|
||||
|
Loading…
Reference in New Issue
Block a user