diff --git a/src/IRCChannel.py b/src/IRCChannel.py index aeb0b784..10f43edb 100644 --- a/src/IRCChannel.py +++ b/src/IRCChannel.py @@ -64,7 +64,7 @@ class Channel(IRCObject.Object): else: self.modes[mode].add(arg.lower()) def remove_mode(self, mode: str, arg: str=None): - if not arg: + if not arg and mode in self.modes: del self.modes[mode] else: if mode in self.server.prefix_modes: