1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-13 05:03:45 -04:00

/notice *, /ctcp * and /nctcp * crashed if there wasn't active window item.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2743 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-04-30 22:39:13 +00:00 committed by cras
parent d79cfc6362
commit 947c1bb1c6

View File

@ -108,7 +108,7 @@ static void cmd_notice(const char *data, IRC_SERVER_REC *server,
&target, &msg))
return;
if (strcmp(target, "*") == 0)
target = item == NULL ? NULL : item->name;
target = item == NULL ? "" : item->name;
if (*target == '\0' || *msg == '\0')
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
@ -130,7 +130,7 @@ static void cmd_ctcp(const char *data, IRC_SERVER_REC *server,
&target, &ctcpcmd, &ctcpdata))
return;
if (strcmp(target, "*") == 0)
target = item == NULL ? NULL : item->name;
target = item == NULL ? "" : item->name;
if (*target == '\0' || *ctcpcmd == '\0')
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
@ -161,7 +161,7 @@ static void cmd_nctcp(const char *data, IRC_SERVER_REC *server,
&target, &text))
return;
if (strcmp(target, "*") == 0)
target = item == NULL ? NULL : item->name;
target = item == NULL ? "" : item->name;
if (*target == '\0' || *text == '\0')
cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);