summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-08-27 19:46:48 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-08-27 19:46:48 +0000
commitfd6fe24317fa190fec840c54087299fc3b860789 (patch)
tree6cf74350e15b9be123f9c12d7def031d44f278ae /src
parent1faed99b33cc9d9617f0868964b25cc686aa82bd (diff)
downloadirssi-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.c5
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);