diff options
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/modes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index d476d84a..f58cc024 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -338,10 +338,11 @@ void parse_channel_modes(IRC_CHANNEL_REC *channel, const char *setby, in channel modes.. */ g_free(channel->key); channel->key = NULL; - } else if (!update_key) { + } else if (!update_key && old_key != NULL) { /* get the old one back, just in case it was replaced */ g_free(channel->key); channel->key = old_key; + mode_set_arg(channel->server, newmode, '+', 'k', old_key, FALSE); old_key = NULL; } |