Added a try/finally statement like ChannelLogger just got.

This commit is contained in:
Jeremy Fincher 2003-09-23 18:45:08 +00:00
parent 3f78522f15
commit fcab1a30cf

View File

@ -135,9 +135,11 @@ class Relay(callbacks.Privmsg):
def __call__(self, irc, msg):
if not isinstance(irc, irclib.Irc):
irc = irc.getRealIrc()
try:
self.ircstates[irc].addMsg(irc, self.lastmsg[irc])
self.lastmsg[irc] = msg
callbacks.Privmsg.__call__(self, irc, msg)
finally:
self.lastmsg[irc] = msg
def die(self):
for irc in self.abbreviations: