mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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:
parent
97599703af
commit
b76c7db60e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user