3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +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 # 1) irc.pseudoclient must be initialized already
# 2) IRC object must be finished bursting # 2) IRC object must be finished bursting
# 3) Target channel must exist # 3) Target channel must exist
# 4) Main PyLink client must be in this target channel # 4) This function hasn't been called already (prevents recursive loops).
# 5) This function hasn't been called already (prevents recursive loops).
if self.irc.pseudoclient and self.irc.connected.is_set() \ if self.irc.pseudoclient and self.irc.connected.is_set() \
and self.channel in self.irc.channels and self.irc.pseudoclient.uid in \ and self.channel in self.irc.channels and not self.called:
self.irc.channels[self.channel].users and not self.called:
self.called = True self.called = True
msg = self.format(record) msg = self.format(record)