Implement indexing into Apache Druid #1
|
@ -4,6 +4,7 @@
|
||||||
"entity": "NickServ",
|
"entity": "NickServ",
|
||||||
"domains": [],
|
"domains": [],
|
||||||
"registermsg": "REGISTER {password} {email}",
|
"registermsg": "REGISTER {password} {email}",
|
||||||
|
"identifymsg": "IDENTIFY {password}",
|
||||||
"confirm": "CONFIRM {token}",
|
"confirm": "CONFIRM {token}",
|
||||||
"check": true,
|
"check": true,
|
||||||
"ping": true,
|
"ping": true,
|
||||||
|
|
|
@ -2,7 +2,7 @@ from copy import deepcopy
|
||||||
from random import choice
|
from random import choice
|
||||||
|
|
||||||
import main
|
import main
|
||||||
from modules import provision
|
from modules import provision, helpers
|
||||||
from utils.logging.debug import debug
|
from utils.logging.debug import debug
|
||||||
from utils.logging.log import error
|
from utils.logging.log import error
|
||||||
|
|
||||||
|
@ -61,10 +61,17 @@ def substitute(net, num, token=None):
|
||||||
# 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)
|
||||||
|
|
||||||
|
name = f"{net}{num}"
|
||||||
|
if name in main.IRCPool:
|
||||||
|
curnick = main.IRCPool[name].nickname
|
||||||
|
else:
|
||||||
|
curnick = 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
|
||||||
inst[i] = inst[i].replace("{nickname}", nickname)
|
inst[i] = inst[i].replace("{nickname}", nickname)
|
||||||
|
inst[i] = inst[i].replace("{curnick}", curnick)
|
||||||
inst[i] = inst[i].replace("{password}", password)
|
inst[i] = inst[i].replace("{password}", password)
|
||||||
inst[i] = inst[i].replace("{email}", email)
|
inst[i] = inst[i].replace("{email}", email)
|
||||||
if token:
|
if token:
|
||||||
|
|
Loading…
Reference in New Issue