added autojoin list option
This commit is contained in:
parent
f62f3d6e68
commit
fb01696636
21
config.py
21
config.py
|
@ -11,16 +11,7 @@ class config:
|
|||
port = 6697
|
||||
ssl = True
|
||||
channel = "##jan6"
|
||||
|
||||
capabilities = [
|
||||
"message-tags",
|
||||
"multi-prefix",
|
||||
"account-tag",
|
||||
"batch",
|
||||
"account-notify",
|
||||
"chghost",
|
||||
"away-notify",
|
||||
]
|
||||
autojoin = ["##sharing"]
|
||||
|
||||
class admin:
|
||||
accounts = ["jan6"]
|
||||
|
@ -33,3 +24,13 @@ class config:
|
|||
# admin-only override,
|
||||
# useful for testing broken commands which should still be normal-user accessible
|
||||
admin_only = []
|
||||
|
||||
capabilities = [
|
||||
"message-tags",
|
||||
"multi-prefix",
|
||||
"account-tag",
|
||||
"batch",
|
||||
"account-notify",
|
||||
"chghost",
|
||||
"away-notify",
|
||||
]
|
||||
|
|
10
stuff.py
10
stuff.py
|
@ -17,7 +17,8 @@ def stuff(bot, sock):
|
|||
# mesg=util.mesg
|
||||
server_caps = []
|
||||
wanted_caps = config.capabilities
|
||||
chan = config.server.channel # autojoin channel
|
||||
chan = config.server.channel # main channel
|
||||
autojoin_done=False
|
||||
is_pm = False
|
||||
mode = "init"
|
||||
|
||||
|
@ -87,6 +88,13 @@ def stuff(bot, sock):
|
|||
elif mode == "boot":
|
||||
send(irctokens.build("JOIN", [chan]).format())
|
||||
mode = "normal"
|
||||
elif mode == "normal" and autojoin_done==False:
|
||||
try:
|
||||
for channel in config.server.autojoin:
|
||||
send("JOIN "+channel)
|
||||
time.sleep(0.25)
|
||||
except Exception: True
|
||||
autojoin_done=True
|
||||
elif mode == "normal":
|
||||
if line.command == "433":
|
||||
mesg("nick in use!", chan)
|
||||
|
|
Loading…
Reference in New Issue