Use substitutions in registration tests
This commit is contained in:
parent
0473c57291
commit
45fa21fea3
|
@ -88,32 +88,32 @@ def enableAuthentication(net, num):
|
|||
confirmRegistration(net, num)
|
||||
|
||||
def registerTest(c):
|
||||
inst = selectInst(c["net"])
|
||||
sinst = substitute(c["net"], c["num"])
|
||||
name = c["net"]+str(c["num"])
|
||||
if inst["check"] == False:
|
||||
if sinst["check"] == False:
|
||||
return
|
||||
if "msg" in c.keys() and not c["msg"] == None:
|
||||
if inst["negative"]:
|
||||
if sinst["negative"]:
|
||||
if name in main.IRCPool.keys():
|
||||
if not main.IRCPool[name]._negativePass == True:
|
||||
if c["type"] == "query" and c["nick"] == inst["entity"]:
|
||||
if inst["checknegativemsg"] in c["msg"]:
|
||||
if c["type"] == "query" and c["nick"] == sinst["entity"]:
|
||||
if sinst["checknegativemsg"] in c["msg"]:
|
||||
confirmRegistration(c["net"], c["num"], negativepass=False) # Not passed negative check, report back
|
||||
return
|
||||
if inst["checkendnegative"] in c["msg"]:
|
||||
if sinst["checkendnegative"] in c["msg"]:
|
||||
confirmRegistration(c["net"], c["num"], negativepass=True) # Passed the negative check, report back
|
||||
return
|
||||
if inst["ping"]:
|
||||
if inst["checkmsg2"] in c["msg"] and c["nick"] == inst["entity"]:
|
||||
if sinst["ping"]:
|
||||
if sinst["checkmsg2"] in c["msg"] and c["nick"] == sinst["entity"]:
|
||||
confirmRegistration(c["net"], c["num"])
|
||||
return
|
||||
if inst["checktype"] == "msg":
|
||||
if inst["checkmsg"] in c["msg"]:
|
||||
if sinst["checktype"] == "msg":
|
||||
if sinst["checkmsg"] in c["msg"]:
|
||||
confirmRegistration(c["net"], c["num"])
|
||||
return
|
||||
elif inst["checktype"] == "mode":
|
||||
elif sinst["checktype"] == "mode":
|
||||
if c["type"] == "self":
|
||||
if c["mtype"] == "mode":
|
||||
if inst["checkmode"] in c["mode"] and c["status"] == True:
|
||||
if sinst["checkmode"] in c["mode"] and c["status"] == True:
|
||||
confirmRegistration(c["net"], c["num"])
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue