mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -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:
parent
ab99ca7231
commit
6e24ac82ed
@ -639,10 +639,14 @@ static char *get_optional_channel(WI_ITEM_REC *active_item, char **data)
|
||||
origtmp = tmp = g_strdup(*data);
|
||||
channel = cmd_get_param(&tmp);
|
||||
|
||||
if (strcmp(channel, "*") == 0 ||
|
||||
!server_ischannel(active_item->server, channel))
|
||||
if (strcmp(channel, "*") == 0) {
|
||||
/* "*" means active channel */
|
||||
cmd_get_param(data);
|
||||
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.
|
||||
This allows automatic !channel -> !XXXXXchannel replaces. */
|
||||
channel = cmd_get_param(data);
|
||||
|
Loading…
Reference in New Issue
Block a user