From 3f7e2328fe82122d9baf3b931f13003d0cb0edb9 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 10 Feb 2018 15:53:49 -0800 Subject: [PATCH] relay: make endburst delay configurable Also, raise the default to 10 seconds. --- docs/advanced-relay-config.md | 1 + plugins/relay.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced-relay-config.md b/docs/advanced-relay-config.md index bcac85b..84df296 100644 --- a/docs/advanced-relay-config.md +++ b/docs/advanced-relay-config.md @@ -33,3 +33,4 @@ To disable relaying for any specific event, set the template string to an empty ### Misc. options - `relay:clientbot_startup_delay`: Defines the amount of seconds Clientbot should wait after startup, before relaying any non-PRIVMSG events. This is used to prevent excess floods when the bot connects. Defaults to 5 seconds. - `servers:NETNAME:relay_force_slashes`: This network specific option forces Relay to use `/` in nickname separators. You should only use this option on TS6 or P10 variants that are less strict with nickname validation, as **it will cause protocol violations** on most IRCds. UnrealIRCd and InspIRCd users do not need to set this either, as `/` in nicks is automatically enabled. +- `servers:NETNAME:relay_endburst_delay`: InspIRCd networks only: sets the endburst delay for relay subservers. If relay server bursts are causing +j (join flood) protection to trigger, raising this value can work around the issue. diff --git a/plugins/relay.py b/plugins/relay.py index e7af949..414c872 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -230,7 +230,7 @@ def spawn_relay_server(irc, remoteirc): needs_delayed_eob = hasattr(irc, '_endburst_delay') if needs_delayed_eob: old_eob_delay = irc._endburst_delay - irc._endburst_delay = 3 + irc._endburst_delay = irc.serverdata.get('relay_endburst_delay', 10) sid = irc.spawn_server('%s.%s' % (remoteirc.name, suffix), desc="PyLink Relay network - %s" %