From bffc5b0ec45b7f50c557b54b28c793ee9573608d Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 21 Jun 2019 11:16:53 +0100 Subject: [PATCH] WARN log when we try to remove a mode from ourselves that we didn't have --- src/IRCServer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/IRCServer.py b/src/IRCServer.py index a1887fb7..e7ee3422 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -160,6 +160,9 @@ class Server(IRCObject.Object): def remove_own_mode(self, mode: str): if mode in self.own_modes: del self.own_modes[mode] + else: + self.bot.log.warn("Tried to remove unknown own mode %s on %s", + [mode, str(self)]) def change_own_mode(self, remove: bool, mode: str, arg: str=None): if remove: self.remove_own_mode(mode)