|
|
@ -5,6 +5,7 @@ from utils.logging.debug import *
|
|
|
|
from copy import deepcopy
|
|
|
|
from copy import deepcopy
|
|
|
|
from random import choice
|
|
|
|
from random import choice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def needToRegister(net):
|
|
|
|
def needToRegister(net):
|
|
|
|
# Check if the network does not support authentication
|
|
|
|
# Check if the network does not support authentication
|
|
|
|
networkObj = main.network[net]
|
|
|
|
networkObj = main.network[net]
|
|
|
@ -51,7 +52,7 @@ def substitute(net, num, token=None):
|
|
|
|
nickname = alias["nick"]
|
|
|
|
nickname = alias["nick"]
|
|
|
|
username = nickname + "/" + net
|
|
|
|
username = nickname + "/" + net
|
|
|
|
password = main.network[net].aliases[num]["password"]
|
|
|
|
password = main.network[net].aliases[num]["password"]
|
|
|
|
#inst["email"] = inst["email"].replace("{nickname}", nickname)
|
|
|
|
# inst["email"] = inst["email"].replace("{nickname}", nickname)
|
|
|
|
for i in inst.keys():
|
|
|
|
for i in inst.keys():
|
|
|
|
if not isinstance(inst[i], str):
|
|
|
|
if not isinstance(inst[i], str):
|
|
|
|
continue
|
|
|
|
continue
|
|
|
@ -129,10 +130,14 @@ def registerTest(c):
|
|
|
|
if not main.IRCPool[name]._negativePass == True:
|
|
|
|
if not main.IRCPool[name]._negativePass == True:
|
|
|
|
if c["type"] == "query" and c["nick"] == sinst["entity"]:
|
|
|
|
if c["type"] == "query" and c["nick"] == sinst["entity"]:
|
|
|
|
if sinst["checknegativemsg"] in c["msg"]:
|
|
|
|
if sinst["checknegativemsg"] in c["msg"]:
|
|
|
|
confirmRegistration(c["net"], c["num"], negativepass=False) # Not passed negative check, report back
|
|
|
|
confirmRegistration(
|
|
|
|
|
|
|
|
c["net"], c["num"], negativepass=False
|
|
|
|
|
|
|
|
) # Not passed negative check, report back
|
|
|
|
return
|
|
|
|
return
|
|
|
|
if sinst["checkendnegative"] in c["msg"]:
|
|
|
|
if sinst["checkendnegative"] in c["msg"]:
|
|
|
|
confirmRegistration(c["net"], c["num"], negativepass=True) # Passed the negative check, report back
|
|
|
|
confirmRegistration(
|
|
|
|
|
|
|
|
c["net"], c["num"], negativepass=True
|
|
|
|
|
|
|
|
) # Passed the negative check, report back
|
|
|
|
return
|
|
|
|
return
|
|
|
|
if sinst["ping"]:
|
|
|
|
if sinst["ping"]:
|
|
|
|
if sinst["checkmsg2"] in c["msg"] and c["nick"] == sinst["entity"]:
|
|
|
|
if sinst["checkmsg2"] in c["msg"] and c["nick"] == sinst["entity"]:
|
|
|
|