Fix for uncaught exception in IrcState.addMsg.

This commit is contained in:
Jeremy Fincher 2004-10-24 07:59:54 +00:00
parent 03b740ec9d
commit c256a3d275

View File

@ -477,8 +477,11 @@ class IrcState(IrcCommandDispatcher):
def doPart(self, irc, msg): def doPart(self, irc, msg):
for channel in msg.args[0].split(','): for channel in msg.args[0].split(','):
chan = self.channels[channel] try:
if msg.nick == irc.nick: chan = self.channels[channel]
except KeyError:
continue
if ircutils.strEqual(msg.nick, irc.nick):
del self.channels[channel] del self.channels[channel]
else: else:
chan.removeUser(msg.nick) chan.removeUser(msg.nick)