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:
parent
a8193b168a
commit
072a4c774f
@ -186,7 +186,7 @@ void chatnets_init(void)
|
|||||||
{
|
{
|
||||||
chatnets = NULL;
|
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("setup reread", (SIGNAL_FUNC) read_chatnets);
|
||||||
signal_add_first("irssi init read settings", (SIGNAL_FUNC) read_chatnets);
|
signal_add_first("irssi init read settings", (SIGNAL_FUNC) read_chatnets);
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "channels-setup.h"
|
||||||
|
|
||||||
#include "irc.h"
|
#include "irc.h"
|
||||||
#include "irc-channels.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);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 2, NULL, &channel);
|
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);
|
g_free_not_null(server->last_invite);
|
||||||
server->last_invite = g_strdup(channel);
|
server->last_invite = g_strdup(channel);
|
||||||
g_free(params);
|
g_free(params);
|
||||||
|
Loading…
Reference in New Issue
Block a user