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
|
self.originalIrc = None
|
||||||
|
|
||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
if not isinstance(irc, irclib.Irc):
|
if self.started:
|
||||||
irc = irc.getRealIrc()
|
try:
|
||||||
try:
|
if not isinstance(irc, irclib.Irc):
|
||||||
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
|
irc = irc.getRealIrc()
|
||||||
callbacks.Privmsg.__call__(self, irc, msg)
|
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
|
||||||
finally:
|
finally:
|
||||||
self.lastmsg[irc] = msg
|
self.lastmsg[irc] = msg
|
||||||
|
callbacks.Privmsg.__call__(self, irc, msg)
|
||||||
|
|
||||||
def die(self):
|
def die(self):
|
||||||
for irc in self.abbreviations:
|
for irc in self.abbreviations:
|
||||||
|
Loading…
Reference in New Issue
Block a user