allow blacklisting channels (won't join when invited)

This commit is contained in:
jan6 2023-10-29 16:38:43 -05:00
parent 1ffe8c91ef
commit 1d78cce8be
2 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ class config(config):
nickserv_recover = "RECOVER" # I recall it being GHOST on some networks?
channel = "#bots"
autojoin = ["#some-other", "##channels"]
blacklisted_channels=[]
class admin:
# ircv3 account-tag based admin

View File

@ -162,7 +162,7 @@ def stuff(bot, sock):
else:
nick_override = False
if line.command == "INVITE":
send(irctokens.build("JOIN", [line.params[1]]).format())
send(irctokens.build("JOIN", [line.params[1]]).format()) if line.params[1] not in config.server.blacklisted_channels else None
elif line.command == "PRIVMSG":
if line.tags == None or "batch" not in line.tags:
is_pm = False