From 6a422552d5dd03669b5c9ccf4770ff341216a8dc Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 5 Aug 2001 06:45:29 +0000 Subject: [PATCH] /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 --- src/core/chat-commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);