Implement authentication checking on connection
This commit is contained in:
parent
c879caa9d7
commit
77e8ef4c16
|
@ -2,12 +2,15 @@
|
||||||
"_": {
|
"_": {
|
||||||
"register": true,
|
"register": true,
|
||||||
"entity": "NickServ",
|
"entity": "NickServ",
|
||||||
"email": "{nickname}.irc@domain.com",
|
"email": "{nickname}@domain.com",
|
||||||
"register": "REGISTER {password} {email}",
|
"register": "REGISTER {password} {email}",
|
||||||
"confirm": "CONFIRM {token}",
|
"confirm": "CONFIRM {token}",
|
||||||
"check": true,
|
"check": true,
|
||||||
|
"ping": true,
|
||||||
|
"pingmsg": "STATUS {nickname}",
|
||||||
"checktype": "mode",
|
"checktype": "mode",
|
||||||
"checkmode": "r",
|
"checkmode": "r",
|
||||||
"checkmsg": "Password accepted - you are now recognized."
|
"checkmsg": "Password accepted - you are now recognized.",
|
||||||
|
"checkmsg2": "You are logged in as"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,11 +81,16 @@ def registerTest(c):
|
||||||
inst = selectInst(c["net"])
|
inst = selectInst(c["net"])
|
||||||
if inst["check"] == False:
|
if inst["check"] == False:
|
||||||
return
|
return
|
||||||
|
if "msg" in c.keys():
|
||||||
if inst["checktype"] == "msg":
|
if inst["checktype"] == "msg":
|
||||||
if c["type"] == "query":
|
if c["type"] == "query":
|
||||||
if inst["checkmsg"] in c["msg"] and c["nick"] == inst["entity"]:
|
if inst["checkmsg"] in c["msg"] and c["nick"] == inst["entity"]:
|
||||||
confirmRegistration(c["net"], c["num"])
|
confirmRegistration(c["net"], c["num"])
|
||||||
return
|
return
|
||||||
|
if inst["ping"]:
|
||||||
|
if inst["checkmsg2"] in c["msg"] and c["nick"] == inst["entity"]:
|
||||||
|
confirmRegistration(c["net"], c["num"])
|
||||||
|
return
|
||||||
elif inst["checktype"] == "mode":
|
elif inst["checktype"] == "mode":
|
||||||
if c["type"] == "self":
|
if c["type"] == "self":
|
||||||
if c["mtype"] == "mode":
|
if c["mtype"] == "mode":
|
||||||
|
|
Loading…
Reference in New Issue