1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

The channel key given in /JOIN should override the one given in setup.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@495 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-07-20 12:35:54 +00:00 committed by cras
parent 97599703af
commit b76c7db60e

View File

@ -192,13 +192,13 @@ void channels_join(IRC_SERVER_REC *server, const char *data, int automatic)
schannel = channels_setup_find(channel, server->connrec->ircnet);
g_string_sprintfa(outchans, "%s,", channel);
if (schannel == NULL || schannel->password == NULL) {
key = *tmpkey == NULL || **tmpkey == '\0' ? NULL : *tmpkey;
} else {
if (*tmpkey != NULL && **tmpkey != '\0')
key = *tmpkey;
else if (schannel != NULL && schannel->password != NULL) {
/* get password from setup record */
use_keys = TRUE;
key = schannel->password;
}
} else key = NULL;
g_string_sprintfa(outkeys, "%s,", get_join_key(key));
chanrec = channel_create(server, channel + (channel[0] == '!' && channel[1] == '!'), automatic);