|
|
|
@ -114,15 +114,31 @@ def confirmRegistration(net, num, negativepass=None):
|
|
|
|
|
main.saveConf("network")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def enableAuthentication(net, num):
|
|
|
|
|
def attemptManualAuthentication(net, num):
|
|
|
|
|
sinst = substitute(net, num)
|
|
|
|
|
obj = main.network[net]
|
|
|
|
|
identifymsg = sinst["identifymsg"]
|
|
|
|
|
entity = sinst["entity"]
|
|
|
|
|
name = f"{net}{num}"
|
|
|
|
|
if name not in main.IRCPool:
|
|
|
|
|
return
|
|
|
|
|
main.IRCPool[name].msg(entity, identifymsg)
|
|
|
|
|
|
|
|
|
|
def enableAuthentication(net, num, jump=True, run_now=False):
|
|
|
|
|
obj = main.network[net]
|
|
|
|
|
nick = main.alias[num]["nick"]
|
|
|
|
|
security = obj.security
|
|
|
|
|
auth = obj.auth
|
|
|
|
|
password = obj.aliases[num]["password"]
|
|
|
|
|
name = f"{net}{num}"
|
|
|
|
|
if name not in main.IRCPool:
|
|
|
|
|
return
|
|
|
|
|
# uname = main.alias[num]["nick"] + "/" + net
|
|
|
|
|
password = main.network[net].aliases[num]["password"]
|
|
|
|
|
provision.provisionAuthenticationData(num, nick, net, security, auth, password) # Set up for auth
|
|
|
|
|
main.IRCPool[net + str(num)].msg(main.config["Tweaks"]["ZNC"]["Prefix"] + "status", "Jump")
|
|
|
|
|
if jump:
|
|
|
|
|
main.IRCPool[name].msg(main.config["Tweaks"]["ZNC"]["Prefix"] + "status", "Jump")
|
|
|
|
|
if run_now:
|
|
|
|
|
attemptManualAuthentication(net, num)
|
|
|
|
|
if selectInst(net)["check"] is False:
|
|
|
|
|
confirmRegistration(net, num)
|
|
|
|
|
|
|
|
|
|