diff options
author | Timo Sirainen <cras@irssi.org> | 2002-08-27 19:46:48 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-08-27 19:46:48 +0000 |
commit | fd6fe24317fa190fec840c54087299fc3b860789 (patch) | |
tree | 6cf74350e15b9be123f9c12d7def031d44f278ae /src | |
parent | 1faed99b33cc9d9617f0868964b25cc686aa82bd (diff) | |
download | irssi-fd6fe24317fa190fec840c54087299fc3b860789.zip |
a bit more fixes for +k updating
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2906 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/modes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index 0fce2e9b..fb7fbb6c 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -250,13 +250,14 @@ void parse_channel_modes(IRC_CHANNEL_REC *channel, const char *setby, channel->limit = type == '-' ? 0 : atoi(arg); break; case 'k': - if (*arg == '\0' && type == '+') { + if ((*arg == '\0' && type == '+') || + (channel->key != NULL && !update_key)) { arg = channel->key != NULL ? channel->key : "???"; } mode_set_arg(newmode, type, 'k', arg); - if (arg != channel->key && update_key) { + if (arg != channel->key) { g_free_and_null(channel->key); if (type == '+') channel->key = g_strdup(arg); |