From 559e1f4afd289c287013431dd29e749d3c9be2d7 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sun, 14 Aug 2022 13:51:13 +0100 Subject: [PATCH] Print identification message --- modules/provision.py | 15 ++++++++++----- modules/regproc.py | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/provision.py b/modules/provision.py index 3b9d6a4..e000611 100644 --- a/modules/provision.py +++ b/modules/provision.py @@ -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) diff --git a/modules/regproc.py b/modules/regproc.py index 00b20c2..685568f 100644 --- a/modules/regproc.py +++ b/modules/regproc.py @@ -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: