From 00337fa7833150ab664b19d0597b778fe77135dd Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 17 Dec 2015 21:18:16 -0800 Subject: [PATCH] relay: delay ENDBURST in spawnServer by 3 seconds (Closes #128) --- plugins/relay.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/relay.py b/plugins/relay.py index e091e96..f98530e 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -187,10 +187,12 @@ def getRemoteSid(irc, remoteirc): sid = relayservers[irc.name][remoteirc.name] except KeyError: try: + # ENDBURST is delayed by 3 secs on supported IRCds to prevent + # triggering join-flood protection and the like. sid = irc.proto.spawnServer('%s.relay' % remoteirc.name, desc="PyLink Relay network - %s" % (remoteirc.serverdata.get('netname')\ - or remoteirc.name)) + or remoteirc.name), endburst_delay=3) except ValueError: # Network not initialized yet. log.exception('(%s) Failed to spawn server for %r:', irc.name, remoteirc.name)