mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 01:24:05 +01:00
Handle flusher correctly.
This commit is contained in:
parent
6c13f55ab4
commit
78f03078d8
@ -55,14 +55,13 @@ class ChannelLogger(callbacks.Plugin):
|
||||
self.lastMsgs = {}
|
||||
self.lastStates = {}
|
||||
self.logs = {}
|
||||
world.flushers.append(self.flush)
|
||||
self.flusher = self.flush
|
||||
world.flushers.append(self.flusher)
|
||||
|
||||
def die(self):
|
||||
for log in self._logs():
|
||||
log.close()
|
||||
world.flushers = [x for x in world.flushers
|
||||
if hasattr(x, 'im_class') and
|
||||
x.im_class is not self.__class__]
|
||||
world.flushers = [x for x in world.flushers if x is not self.flusher]
|
||||
|
||||
def __call__(self, irc, msg):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user