diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-20 14:37:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-20 14:37:56 +0000 |
commit | 495501c284e35d02e8be1586d941920a12d0a1d7 (patch) | |
tree | b7c1d89fd9cfb8578b54aca1f30be4f4ce53f39f /src | |
parent | cafb1e0805276a5e26f43c861fc66dd048dd9885 (diff) | |
download | irssi-495501c284e35d02e8be1586d941920a12d0a1d7.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/channel-rejoin.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); |