summaryrefslogtreecommitdiff
path: root/src/core/chat-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-08-05 06:45:29 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-08-05 06:45:29 +0000
commit6a422552d5dd03669b5c9ccf4770ff341216a8dc (patch)
tree0f0e4090ff62449c6782c7862572467314304105 /src/core/chat-commands.c
parentfc2d7d4ab82475131c2ff43cafc8152307f8a76e (diff)
downloadirssi-6a422552d5dd03669b5c9ccf4770ff341216a8dc.zip
/MSG * in empty window now prints "not joined" error
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1707 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/chat-commands.c')
-rw-r--r--src/core/chat-commands.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c
index 2303a701..02ce45bf 100644
--- a/src/core/chat-commands.c
+++ b/src/core/chat-commands.c
@@ -297,8 +297,12 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
NULL, &free_ret, NULL, 0);
if (target != NULL && *target == '\0')
target = NULL;
- } else if (strcmp(target, "*") == 0 && item != NULL)
+ } else if (strcmp(target, "*") == 0) {
+ if (item == NULL)
+ cmd_param_error(CMDERR_NOT_JOINED);
+
target = item->name;
+ }
if (target != NULL)
server->send_message(server, target, msg);