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

If we receive INVITE for a channel that is added with /CHANNEL ADD -auto,

join it immediately.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1724 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-08-08 17:47:54 +00:00 committed by cras
parent a8193b168a
commit 072a4c774f
2 changed files with 12 additions and 1 deletions

View File

@ -186,7 +186,7 @@ void chatnets_init(void)
{
chatnets = NULL;
signal_add("event connected", (SIGNAL_FUNC) sig_connected);
signal_add_first("event connected", (SIGNAL_FUNC) sig_connected);
signal_add("setup reread", (SIGNAL_FUNC) read_chatnets);
signal_add_first("irssi init read settings", (SIGNAL_FUNC) read_chatnets);
}

View File

@ -21,6 +21,7 @@
#include "module.h"
#include "signals.h"
#include "misc.h"
#include "channels-setup.h"
#include "irc.h"
#include "irc-channels.h"
@ -288,6 +289,16 @@ static void event_invite(IRC_SERVER_REC *server, const char *data)
g_return_if_fail(data != NULL);
params = event_get_params(data, 2, NULL, &channel);
if (irc_channel_find(server, channel) == NULL) {
/* check if we're supposed to autojoin this channel */
CHANNEL_SETUP_REC *setup;
setup = channel_setup_find(channel, server->connrec->chatnet);
if (setup != NULL && setup->autojoin)
server->channels_join(SERVER(server), channel, TRUE);
}
g_free_not_null(server->last_invite);
server->last_invite = g_strdup(channel);
g_free(params);