3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 11:39:25 +01:00

ts6: manually set a timer for ENDBURST so relay's initializeAll works

This commit is contained in:
James Lu 2015-07-20 23:53:21 -07:00
parent 73c41b4363
commit 6ba42759cf

View File

@ -463,6 +463,14 @@ def handle_events(irc, data):
# Does charybdis propagate these? If so, how?
log.debug('(%s) irc.connected set!', irc.name)
irc.connected.set()
# Charybdis doesn't have the idea of an explicit endburst; but some plugins
# like relay require it to know that the network's connected.
# We'll set a timer to manually call endburst. It's not beautiful,
# but it's the best we can do.
endburst_timer = threading.Timer(1, irc.callHooks, args=([irc.uplink, 'ENDBURST', {}],))
log.debug('(%s) Starting delay to send ENDBURST', irc.name)
endburst_timer.start()
try:
real_args = []
for arg in args: