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.

This commit is contained in:
jesopo 2016-04-10 17:31:05 +01:00
parent d0be88ef3b
commit 842de08b47
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -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(