Implement channel blacklisting

This commit is contained in:
2020-11-01 19:54:24 +00:00
parent cb21ad8fca
commit 1f178a20ed
5 changed files with 49 additions and 1 deletions

View File

@@ -181,6 +181,10 @@ class IRCBot(IRCClient):
increment = 0.8
for i in channels:
if not i in self.channels:
if self.net in main.blacklist.keys():
if i in main.blacklist[self.net]:
debug("Not joining blacklisted channel %s on %s - %i" % (i, self.net, self.num))
continue
debug(self.net, "-", self.num, ": joining", i, "in", sleeptime, "seconds")
reactor.callLater(sleeptime, self.join, i)
sleeptime += increment