Implement indexing into Apache Druid #1
|
@ -239,11 +239,11 @@ class API(object):
|
||||||
return dumps({"success": False, "reason": f"failed to get instances for {net_name}."})
|
return dumps({"success": False, "reason": f"failed to get instances for {net_name}."})
|
||||||
if func == "recheckauth":
|
if func == "recheckauth":
|
||||||
for conn in conns:
|
for conn in conns:
|
||||||
conn.regPing()
|
conn.regPing(reset=True)
|
||||||
elif func == "resetauth":
|
elif func == "resetauth":
|
||||||
for conn in conns:
|
for conn in conns:
|
||||||
conn.authenticated = False
|
conn.authenticated = False
|
||||||
conn.regPing()
|
conn.regPing(reset=True)
|
||||||
elif func == "register":
|
elif func == "register":
|
||||||
for conn in conns:
|
for conn in conns:
|
||||||
regproc.registerAccount(conn.net, conn.num)
|
regproc.registerAccount(conn.net, conn.num)
|
||||||
|
|
|
@ -627,7 +627,7 @@ class IRCBot(IRCClient):
|
||||||
|
|
||||||
# End of Twisted hackery
|
# End of Twisted hackery
|
||||||
|
|
||||||
def regPing(self, negativepass=None):
|
def regPing(self, negativepass=None, reset=True):
|
||||||
if self.authenticated:
|
if self.authenticated:
|
||||||
return
|
return
|
||||||
if not regproc.needToAuth(self.net):
|
if not regproc.needToAuth(self.net):
|
||||||
|
@ -637,6 +637,9 @@ class IRCBot(IRCClient):
|
||||||
if not sinst:
|
if not sinst:
|
||||||
error(f"regPing() {self.net}: registration ping failed for {self.num}")
|
error(f"regPing() {self.net}: registration ping failed for {self.num}")
|
||||||
return
|
return
|
||||||
|
if reset:
|
||||||
|
self._negativePass = None
|
||||||
|
|
||||||
if self._negativePass is not True:
|
if self._negativePass is not True:
|
||||||
if negativepass is False:
|
if negativepass is False:
|
||||||
self._negativePass = False
|
self._negativePass = False
|
||||||
|
@ -652,7 +655,7 @@ class IRCBot(IRCClient):
|
||||||
debug(f"regPing() {self.net}: sent ping '{sinst['pingmsg']}' to {sinst['entity']} - {self.num}")
|
debug(f"regPing() {self.net}: sent ping '{sinst['pingmsg']}' to {sinst['entity']} - {self.num}")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
debug("regPing() {self.net}: negative registration check - {self.num}")
|
debug(f"regPing() {self.net}: negative registration check - {self.num}")
|
||||||
return
|
return
|
||||||
|
|
||||||
if sinst["check"]:
|
if sinst["check"]:
|
||||||
|
|
Loading…
Reference in New Issue