From 1b77c50552b44b24ecfe7a7703e83d7777f96c90 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 14 Aug 2022 20:44:04 +0100 Subject: [PATCH] Blacklist channels we are kicked from --- core/bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/bot.py b/core/bot.py index b6c7329..5bff113 100644 --- a/core/bot.py +++ b/core/bot.py @@ -220,6 +220,12 @@ class IRCBot(IRCClient): castDup = deepcopy(cast) castDup["mtype"] = cast["type"] castDup["type"] = "self" + if self.net in main.blacklist.keys(): + if cast["channel"] not in main.blacklist[self.net]: + main.blacklist[self.net].append(cast["channel"]) + else: + main.blacklist[self.net] = [cast["channel"]] + main.saveConf("blacklist") self.event(**castDup) # we sent a message/left/joined/kick someone/quit