mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Made much more efficient.
This commit is contained in:
parent
51a474dd14
commit
52dba88bd3
@ -51,13 +51,16 @@ import ircutils
|
|||||||
class ChannelLogger(irclib.IrcCallback):
|
class ChannelLogger(irclib.IrcCallback):
|
||||||
logs = ircutils.IrcDict()
|
logs = ircutils.IrcDict()
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.laststate = None
|
self.laststate = irclib.IrcState()
|
||||||
|
self.lastMsg = None
|
||||||
world.flushers.append(self.flush)
|
world.flushers.append(self.flush)
|
||||||
|
|
||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
super(self.__class__, self).__call__(irc, msg)
|
super(self.__class__, self).__call__(irc, msg)
|
||||||
#self.__class__.__bases__[0].__call__(self, irc, msg)
|
#self.__class__.__bases__[0].__call__(self, irc, msg)
|
||||||
self.laststate = irc.state.copy()
|
if self.lastMsg:
|
||||||
|
self.laststate.addMsg(irc, self.lastMsg)
|
||||||
|
self.lastMsg = msg
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
for log in self.logs.itervalues():
|
for log in self.logs.itervalues():
|
||||||
|
Loading…
Reference in New Issue
Block a user