diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-03 21:58:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-03 21:58:14 +0000 |
commit | ebaea06eb97a300fd792214545ea223bd992f394 (patch) | |
tree | 7ff046c94cb0c65f9777e20dfbef06587511143e /src/core | |
parent | 7c94cb083f5354cf85453e9465887fc45bf5bcdc (diff) | |
download | irssi-ebaea06eb97a300fd792214545ea223bd992f394.zip |
target_type for "/MSG *" wasn't set properly.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2384 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/chat-commands.c | 10 |
1 files 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; |