1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Commands that accepeted * parameter as active channel didn't work properly -

active channel was used but the * wasn't removed from parameters.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1961 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-03 13:16:36 +00:00 committed by cras
parent ab99ca7231
commit 6e24ac82ed

View File

@ -639,10 +639,14 @@ static char *get_optional_channel(WI_ITEM_REC *active_item, char **data)
origtmp = tmp = g_strdup(*data); origtmp = tmp = g_strdup(*data);
channel = cmd_get_param(&tmp); channel = cmd_get_param(&tmp);
if (strcmp(channel, "*") == 0 || if (strcmp(channel, "*") == 0) {
!server_ischannel(active_item->server, channel)) /* "*" means active channel */
cmd_get_param(data);
ret = active_item->name; ret = active_item->name;
else { } else if (!server_ischannel(active_item->server, channel)) {
/* we don't have channel parameter - use active channel */
ret = active_item->name;
} else {
/* Find the channel first and use it's name if found. /* Find the channel first and use it's name if found.
This allows automatic !channel -> !XXXXXchannel replaces. */ This allows automatic !channel -> !XXXXXchannel replaces. */
channel = cmd_get_param(data); channel = cmd_get_param(data);