Blacklist channels we are kicked from

This commit is contained in:
Mark Veidemanis 2022-08-14 20:44:04 +01:00
parent c55a4058b1
commit 1b39b46121
1 changed files with 6 additions and 0 deletions

View File

@ -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