From ebaea06eb97a300fd792214545ea223bd992f394 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 3 Feb 2002 21:58:14 +0000 Subject: [PATCH] target_type for "/MSG *" wasn't set properly. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2384 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/chat-commands.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index 07a9ae88..8b1b3738 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -335,14 +335,18 @@ 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) { + } + + if (strcmp(target, "*") == 0) { + /* send to active channel/query */ if (item == NULL) cmd_param_error(CMDERR_NOT_JOINED); + target_type = IS_CHANNEL(item) ? + SEND_TARGET_CHANNEL : SEND_TARGET_NICK; target = item->name; } - - if (g_hash_table_lookup(optlist, "channel") != NULL) + else if (g_hash_table_lookup(optlist, "channel") != NULL) target_type = SEND_TARGET_CHANNEL; else if (g_hash_table_lookup(optlist, "nick") != NULL) target_type = SEND_TARGET_NICK;