Don't assume a given mode is in IRCChannel.modes when we check to see if a given
mode has any arguments against it
This commit is contained in:
parent
426c6ff1c9
commit
6d6bfa3262
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ class Channel(IRCObject.Object):
|
||||||
del self.user_modes[user]
|
del self.user_modes[user]
|
||||||
else:
|
else:
|
||||||
self.modes[mode].discard(arg.lower())
|
self.modes[mode].discard(arg.lower())
|
||||||
if not len(self.modes[mode]):
|
if mode in self.modes and not len(self.modes[mode]):
|
||||||
del self.modes[mode]
|
del self.modes[mode]
|
||||||
def change_mode(self, remove: bool, mode: str, arg: str=None):
|
def change_mode(self, remove: bool, mode: str, arg: str=None):
|
||||||
if remove:
|
if remove:
|
||||||
|
|
Loading…
Reference in a new issue