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,8 +64,9 @@ class Channel(IRCObject.Object):
|
|||
else:
|
||||
self.modes[mode].add(arg.lower())
|
||||
def remove_mode(self, mode: str, arg: str=None):
|
||||
if not arg and mode in self.modes:
|
||||
del self.modes[mode]
|
||||
if not arg:
|
||||
if mode in self.modes:
|
||||
del self.modes[mode]
|
||||
else:
|
||||
if mode in self.server.prefix_modes:
|
||||
user = self.server.get_user(arg)
|
||||
|
|
Loading…
Reference in a new issue