From fd6fe24317fa190fec840c54087299fc3b860789 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 27 Aug 2002 19:46:48 +0000 Subject: [PATCH] a bit more fixes for +k updating git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2906 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/modes.c | 5 +++-- 1 file 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);