From a7014495bd0721b1407f155cbf94cce4a731fc84 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 6 Dec 2000 05:51:31 +0000 Subject: [PATCH] sometimes channel key wasn't saved. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@977 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/modes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index a0f7118c..4620b03d 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -280,7 +280,9 @@ void parse_channel_modes(IRC_CHANNEL_REC *channel, const char *setby, } g_free(dup); - if (strchr(channel->mode, 'k') == NULL && channel->key != NULL) { + if (channel->key != NULL && + strchr(channel->mode, 'k') == NULL && + strchr(newmode->str, 'k') == NULL) { /* join was used with key but there's no key set in channel modes.. */ g_free(channel->key);