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

Also remember other (not k or l) modes with arguments

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3316 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Wouter Coekaerts 2004-10-10 21:23:38 +00:00 committed by coekie
parent 8b8c58f4ef
commit 4b40495a5c

View File

@ -218,7 +218,6 @@ void modes_type_b(IRC_CHANNEL_REC *channel, const char *setby, char type,
if (mode == 'k') { if (mode == 'k') {
if (*arg == '\0' && type == '+') if (*arg == '\0' && type == '+')
arg = channel->key != NULL ? channel->key : "???"; arg = channel->key != NULL ? channel->key : "???";
mode_set_arg(channel->server, newmode, type, 'k', arg, FALSE);
if (arg != channel->key) { if (arg != channel->key) {
g_free_and_null(channel->key); g_free_and_null(channel->key);
@ -226,6 +225,8 @@ void modes_type_b(IRC_CHANNEL_REC *channel, const char *setby, char type,
channel->key = g_strdup(arg); channel->key = g_strdup(arg);
} }
} }
mode_set_arg(channel->server, newmode, type, mode, arg, FALSE);
} }
/* Mode that needs parameter only for adding */ /* Mode that needs parameter only for adding */
@ -233,9 +234,10 @@ void modes_type_c(IRC_CHANNEL_REC *channel, const char *setby,
char type, char mode, char *arg, GString *newmode) char type, char mode, char *arg, GString *newmode)
{ {
if (mode == 'l') { if (mode == 'l') {
mode_set_arg(channel->server, newmode, type, 'l', arg, FALSE);
channel->limit = type == '-' ? 0 : atoi(arg); channel->limit = type == '-' ? 0 : atoi(arg);
} }
mode_set_arg(channel->server, newmode, type, mode, arg, FALSE);
} }
/* Mode that takes no parameter */ /* Mode that takes no parameter */