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

log: drop client-in-channel requirement for channel logging

This commit is contained in:
James Lu 2018-06-11 17:26:04 -07:00
parent 17ffd1f640
commit 5f9904126a

6
log.py
View File

@ -137,11 +137,9 @@ class PyLinkChannelLogger(logging.Handler):
# 1) irc.pseudoclient must be initialized already
# 2) IRC object must be finished bursting
# 3) Target channel must exist
# 4) Main PyLink client must be in this target channel
# 5) This function hasn't been called already (prevents recursive loops).
# 4) This function hasn't been called already (prevents recursive loops).
if self.irc.pseudoclient and self.irc.connected.is_set() \
and self.channel in self.irc.channels and self.irc.pseudoclient.uid in \
self.irc.channels[self.channel].users and not self.called:
and self.channel in self.irc.channels and not self.called:
self.called = True
msg = self.format(record)