3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 19:52:53 +01:00

relay: delay ENDBURST in spawnServer by 3 seconds (Closes #128)

This commit is contained in:
James Lu 2015-12-17 21:18:16 -08:00
parent 6b14a885bc
commit 00337fa783

View File

@ -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)