Print identification message
This commit is contained in:
parent
060ee4f0d5
commit
559e1f4afd
|
@ -7,7 +7,7 @@ from utils.logging.log import warn
|
|||
|
||||
|
||||
def provisionUserNetworkData(
|
||||
num, nick, altnick, ident, realname, emails, network, host, port, security, auth, password
|
||||
num, nick, altnick, ident, realname, network, host, port, security
|
||||
):
|
||||
commands = {}
|
||||
stage2commands = {}
|
||||
|
@ -37,7 +37,7 @@ def provisionUserNetworkData(
|
|||
deliverRelayCommands(num, commands, stage2=[[user + "/" + network, stage2commands]])
|
||||
|
||||
|
||||
def provisionAuthenticationData(num, nick, network, security, auth, password):
|
||||
def provisionAuthenticationData(num, nick, network, auth, password):
|
||||
commands = {}
|
||||
commands["status"] = []
|
||||
user = nick.lower()
|
||||
|
@ -63,15 +63,20 @@ def provisionAuthenticationData(num, nick, network, security, auth, password):
|
|||
def provisionRelay(num, network): # provision user and network data
|
||||
aliasObj = main.alias[num]
|
||||
# alias = aliasObj["nick"]
|
||||
nick = aliasObj["nick"]
|
||||
altnick = aliasObj["altnick"]
|
||||
ident = aliasObj["ident"]
|
||||
realname = aliasObj["realname"]
|
||||
provisionUserNetworkData(
|
||||
num,
|
||||
*aliasObj.values(),
|
||||
nick,
|
||||
altnick,
|
||||
ident,
|
||||
realname,
|
||||
network,
|
||||
main.network[network].host,
|
||||
main.network[network].port,
|
||||
main.network[network].security,
|
||||
main.network[network].auth,
|
||||
main.network[network].aliases[num]["password"],
|
||||
)
|
||||
if main.config["ConnectOnCreate"]:
|
||||
reactor.callLater(10, main.network[network].start_bot, num)
|
||||
|
|
|
@ -120,6 +120,7 @@ def attemptManualAuthentication(net, num):
|
|||
identifymsg = sinst["identifymsg"]
|
||||
entity = sinst["entity"]
|
||||
name = f"{net}{num}"
|
||||
print(f"SENDING `{identifymsg}` TO `{entity}` ON {name}")
|
||||
if name not in main.IRCPool:
|
||||
return
|
||||
main.IRCPool[name].msg(entity, identifymsg)
|
||||
|
@ -127,14 +128,13 @@ def attemptManualAuthentication(net, num):
|
|||
def enableAuthentication(net, num, jump=True, run_now=False):
|
||||
obj = main.network[net]
|
||||
nick = main.alias[num]["nick"]
|
||||
security = obj.security
|
||||
auth = obj.auth
|
||||
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
|
||||
provision.provisionAuthenticationData(num, nick, net, auth, password) # Set up for auth
|
||||
if jump:
|
||||
main.IRCPool[name].msg(main.config["Tweaks"]["ZNC"]["Prefix"] + "status", "Jump")
|
||||
if run_now:
|
||||
|
|
Loading…
Reference in New Issue