Handle flusher correctly.

This commit is contained in:
Jeremy Fincher 2006-10-13 05:59:39 +00:00
parent 6c13f55ab4
commit 78f03078d8
1 changed files with 3 additions and 4 deletions

View File

@ -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: