Support removal of modes without args that we don't know about in a way that
doesn't push code execution down the wrong path (src/IRCChannel.py)
This commit is contained in:
parent
aa40936ce6
commit
6405ee2582
1 changed files with 3 additions and 2 deletions
|
@ -64,7 +64,8 @@ class Channel(IRCObject.Object):
|
||||||
else:
|
else:
|
||||||
self.modes[mode].add(arg.lower())
|
self.modes[mode].add(arg.lower())
|
||||||
def remove_mode(self, mode: str, arg: str=None):
|
def remove_mode(self, mode: str, arg: str=None):
|
||||||
if not arg and mode in self.modes:
|
if not arg:
|
||||||
|
if mode in self.modes:
|
||||||
del self.modes[mode]
|
del self.modes[mode]
|
||||||
else:
|
else:
|
||||||
if mode in self.server.prefix_modes:
|
if mode in self.server.prefix_modes:
|
||||||
|
|
Loading…
Reference in a new issue