From 495501c284e35d02e8be1586d941920a12d0a1d7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 20 Dec 2002 14:37:56 +0000 Subject: [PATCH] Added /SET channels_rejoin_unavailable to disable automatic rejoining when channel is unavailable. Efnet is stupid and uses the same numeric for joining juped channels and k-lines you after trying to constantly join it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3062 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/channel-rejoin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/irc/core/channel-rejoin.c b/src/irc/core/channel-rejoin.c index 582f1d0c..6b97208d 100644 --- a/src/irc/core/channel-rejoin.c +++ b/src/irc/core/channel-rejoin.c @@ -21,6 +21,7 @@ #include "module.h" #include "signals.h" +#include "settings.h" #include "misc.h" #include "irc-servers.h" @@ -75,6 +76,9 @@ static void channel_rejoin(IRC_SERVER_REC *server, const char *channel) g_return_if_fail(IS_IRC_SERVER(server)); g_return_if_fail(channel != NULL); + if (!settings_get_bool("channels_rejoin_unavailable")) + return; + chanrec = irc_channel_find(server, channel); if (chanrec == NULL || chanrec->joined) return; @@ -250,6 +254,8 @@ static void cmd_rmrejoins(const char *data, IRC_SERVER_REC *server) void channel_rejoin_init(void) { + settings_add_bool("servers", "channels_rejoin_unavailable", TRUE); + rejoin_tag = g_timeout_add(REJOIN_TIMEOUT, (GSourceFunc) sig_rejoin, NULL);