Blacklist channels we are kicked from

This commit is contained in:
Mark Veidemanis 2022-08-14 20:44:04 +01:00
parent 1ce5a8228c
commit 1b77c50552
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
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