check we have a mode before trying to remove it
This commit is contained in:
parent
4690f3f45d
commit
01438f28f6
1 changed files with 2 additions and 1 deletions
|
@ -158,6 +158,7 @@ class Server(IRCObject.Object):
|
||||||
def add_own_mode(self, mode: str, arg: str=None):
|
def add_own_mode(self, mode: str, arg: str=None):
|
||||||
self.own_modes[mode] = arg
|
self.own_modes[mode] = arg
|
||||||
def remove_own_mode(self, mode: str):
|
def remove_own_mode(self, mode: str):
|
||||||
|
if mode in self.own_modes:
|
||||||
del self.own_modes[mode]
|
del self.own_modes[mode]
|
||||||
def change_own_mode(self, remove: bool, mode: str, arg: str=None):
|
def change_own_mode(self, remove: bool, mode: str, arg: str=None):
|
||||||
if remove:
|
if remove:
|
||||||
|
|
Loading…
Reference in a new issue