mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added a try/finally statement like ChannelLogger just got.
This commit is contained in:
parent
3f78522f15
commit
fcab1a30cf
@ -135,9 +135,11 @@ class Relay(callbacks.Privmsg):
|
|||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
if not isinstance(irc, irclib.Irc):
|
if not isinstance(irc, irclib.Irc):
|
||||||
irc = irc.getRealIrc()
|
irc = irc.getRealIrc()
|
||||||
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
|
try:
|
||||||
self.lastmsg[irc] = msg
|
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
|
||||||
callbacks.Privmsg.__call__(self, irc, msg)
|
callbacks.Privmsg.__call__(self, irc, msg)
|
||||||
|
finally:
|
||||||
|
self.lastmsg[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