mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-03 01:39:23 +01:00
Made sure there were no problems in __call__ if it wasn't started.
This commit is contained in:
parent
06e2e05b78
commit
bb9c956eea
@ -133,13 +133,14 @@ class Relay(callbacks.Privmsg):
|
||||
self.originalIrc = None
|
||||
|
||||
def __call__(self, irc, msg):
|
||||
if not isinstance(irc, irclib.Irc):
|
||||
irc = irc.getRealIrc()
|
||||
try:
|
||||
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
|
||||
callbacks.Privmsg.__call__(self, irc, msg)
|
||||
finally:
|
||||
self.lastmsg[irc] = msg
|
||||
if self.started:
|
||||
try:
|
||||
if not isinstance(irc, irclib.Irc):
|
||||
irc = irc.getRealIrc()
|
||||
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
|
||||
finally:
|
||||
self.lastmsg[irc] = msg
|
||||
callbacks.Privmsg.__call__(self, irc, msg)
|
||||
|
||||
def die(self):
|
||||
for irc in self.abbreviations:
|
||||
|
Loading…
Reference in New Issue
Block a user