Reassign topic handlers after reconnect, otherwise OPEN/CLOSE doesn't work

This commit is contained in:
Ondrej Mikle 2018-05-04 13:52:47 +02:00
parent 9b89a230c9
commit 3bd05b0b3d

View file

@ -280,6 +280,11 @@ class IrcThread(threading.Thread):
self.connection.join(channel)
except:
logging.exception("Exception when rejoining channels")
try:
self.reactor.server().add_global_handler("notopic", partial(IrcThread.onNoTopic, self))
self.reactor.server().add_global_handler("currenttopic", partial(IrcThread.onTopic, self))
except:
logging.exception("Exception while reassigning topic handlers")
def onJoin(self, connection, event):