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):
for channel in msg.args[0].split(','):
chan = self.channels[channel]
if msg.nick == irc.nick:
try:
chan = self.channels[channel]
except KeyError:
continue
if ircutils.strEqual(msg.nick, irc.nick):
del self.channels[channel]
else:
chan.removeUser(msg.nick)