From 73c625a429b268cdd145b0d5d581ed6317b2b239 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 16 Jul 2015 16:48:54 -0700 Subject: [PATCH] pr/insp: don't raise KeyError when removing channel from user fails --- protocols/inspircd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/inspircd.py b/protocols/inspircd.py index edb7170..41a861b 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -353,7 +353,7 @@ def handle_part(irc, source, command, args): channel = args[0].lower() # We should only get PART commands for channels that exist, right?? irc.channels[channel].removeuser(source) - irc.users[source].channels.remove(channel) + irc.users[source].channels.discard(channel) try: reason = args[1] except IndexError: