aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2016-04-10 17:31:05 +0100
committerGravatar jesopo2016-04-10 17:31:05 +0100
commit842de08b47385c58f3554a971af33ca22d448a1c (patch)
tree408994bf903c7469ff1618fc2ca9bd31e9ae2165
parentthis was supposed to be in the last commit. oops. (diff)
changed code to avoid a crash when some ircd will show a mode being removed from someone that didn't have it in the first place.
-rw-r--r--IRCChannel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/IRCChannel.py b/IRCChannel.py
index 666ebfcd..54a174db 100644
--- a/IRCChannel.py
+++ b/IRCChannel.py
@@ -37,7 +37,7 @@ class Channel(object):
if not args:
del self.modes[mode]
else:
- self.modes[mode].remove(args.lower())
+ self.modes[mode].discard(args.lower())
if not len(self.modes[mode]):
del self.modes[mode]
self.bot.events.on("mode").on("channel").call(