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

/MODE +something or /MODE -something assumes that we want to change the

active channel's mode.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@309 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-06-10 08:58:52 +00:00 committed by cras
parent 9b6d5f7e99
commit 47c7817bc5

View File

@ -466,10 +466,16 @@ static void cmd_mode(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item)
if (server == NULL || !server->connected || !irc_server_check(server))
cmd_return_error(CMDERR_NOT_CONNECTED);
params = cmd_get_params(data, 2 | PARAM_FLAG_GETREST, &target, &mode);
if (*data == '+' || *data == '-') {
target = "*";
params = mode = g_strdup(data); /* cmd_param_error() wants to free params.. */
} else {
params = cmd_get_params(data, 2 | PARAM_FLAG_GETREST, &target, &mode);
}
if (strcmp(target, "*") == 0) {
if (!irc_item_channel(item))
cmd_return_error(CMDERR_NOT_JOINED);
cmd_param_error(CMDERR_NOT_JOINED);
target = item->name;
}