Implement indexing into Apache Druid #1
|
@ -1,7 +1,8 @@
|
||||||
|
from json import dumps
|
||||||
|
|
||||||
import main
|
import main
|
||||||
from modules import chankeep
|
from modules import chankeep
|
||||||
from modules import helpers
|
|
||||||
from json import dumps
|
|
||||||
|
|
||||||
class DedupCommand:
|
class DedupCommand:
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import main
|
import main
|
||||||
from modules import chankeep
|
from modules import chankeep
|
||||||
|
|
||||||
from utils.logging.debug import debug
|
from utils.logging.debug import debug
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,7 @@ def substitute(net, num, token=None):
|
||||||
email = f"{alias['nickname']}@{domain}"
|
email = f"{alias['nickname']}@{domain}"
|
||||||
gotemail = True
|
gotemail = True
|
||||||
if not gotemail:
|
if not gotemail:
|
||||||
error(f"Could not get email for {net} - {num}")
|
inst["email"] = False
|
||||||
return False
|
|
||||||
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"]
|
||||||
|
@ -73,6 +72,7 @@ def substitute(net, num, token=None):
|
||||||
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("{curnick}", curnick)
|
||||||
inst[i] = inst[i].replace("{password}", password)
|
inst[i] = inst[i].replace("{password}", password)
|
||||||
|
if gotemail:
|
||||||
inst[i] = inst[i].replace("{email}", email)
|
inst[i] = inst[i].replace("{email}", email)
|
||||||
if token:
|
if token:
|
||||||
inst[i] = inst[i].replace("{token}", token)
|
inst[i] = inst[i].replace("{token}", token)
|
||||||
|
@ -85,6 +85,9 @@ def registerAccount(net, num):
|
||||||
if not sinst:
|
if not sinst:
|
||||||
error(f"Register account failed for {net} - {num}")
|
error(f"Register account failed for {net} - {num}")
|
||||||
return
|
return
|
||||||
|
if not sinst["email"]:
|
||||||
|
error(f"Could not get email for {net} - {num}")
|
||||||
|
return
|
||||||
if not sinst["register"]:
|
if not sinst["register"]:
|
||||||
error("Cannot register for %s: function disabled" % (net))
|
error("Cannot register for %s: function disabled" % (net))
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue