More debugging for reg tests and getstr command
This commit is contained in:
13
core/bot.py
13
core/bot.py
@@ -480,6 +480,8 @@ class IRCBot(IRCClient):
|
||||
chankeep.initialList(self.net, self.num, listinfo)
|
||||
|
||||
def recheckList(self):
|
||||
if not main.config["ChanKeep"]["Enabled"]:
|
||||
return
|
||||
allRelays = chankeep.allRelaysActive(self.net)
|
||||
debug(f"recheckList() all relays for {self.net} {allRelays}")
|
||||
if allRelays:
|
||||
@@ -526,10 +528,11 @@ class IRCBot(IRCClient):
|
||||
if net_inst_chanlimit:
|
||||
if self.chanlimit > net_inst_chanlimit:
|
||||
self.chanlimit = net_inst_chanlimit
|
||||
warn(f"Chanlimit on {self.net} too high, setting to {self.chanlimit}")
|
||||
# warn(f"Chanlimit on {self.net} too high, setting to {self.chanlimit}")
|
||||
|
||||
if not regproc.needToRegister(self.net): # if we need to register, only recheck on auth confirmation
|
||||
self.recheckList()
|
||||
if main.config["ChanKeep"]["Enabled"]:
|
||||
self.recheckList()
|
||||
|
||||
def seed_prefix(self, prefix):
|
||||
prefix = prefix.replace(")", "")
|
||||
@@ -618,6 +621,8 @@ class IRCBot(IRCClient):
|
||||
def regPing(self, negativepass=None):
|
||||
if self.authenticated:
|
||||
return
|
||||
if not regproc.needToRegister(self.net):
|
||||
self.authenticated = True
|
||||
sinst = regproc.substitute(self.net, self.num)
|
||||
if not sinst:
|
||||
error(f"regPing() {self.net}: registration ping failed for {self.num}")
|
||||
@@ -630,7 +635,7 @@ class IRCBot(IRCClient):
|
||||
if negativepass is True:
|
||||
if self._negativePass is None:
|
||||
self._negativePass = True
|
||||
debug(f"regPing() {self.net}: positive registration check - {self.num}")
|
||||
debug(f"regPing() {self.net}: negpass:True positive registration check - {self.num}")
|
||||
if sinst["ping"]:
|
||||
debug("Sending ping - %s - %i" % (self.net, self.num))
|
||||
self.msg(sinst["entity"], sinst["pingmsg"])
|
||||
@@ -644,11 +649,13 @@ class IRCBot(IRCClient):
|
||||
if sinst["negative"]:
|
||||
self._negativePass = None
|
||||
self.msg(sinst["entity"], sinst["negativemsg"])
|
||||
debug(f"regPing() {self.net}: sent negativemsg '{sinst['negativemsg']}' to {sinst['entity']} - {self.num}")
|
||||
return
|
||||
else:
|
||||
self._negativePass = True
|
||||
if sinst["ping"]:
|
||||
self.msg(sinst["entity"], sinst["pingmsg"])
|
||||
debug(f"regPing() {self.net}: sent ping '{sinst['pingmsg']}' to {sinst['entity']} - {self.num}")
|
||||
return
|
||||
else:
|
||||
self.authenticated = True
|
||||
|
||||
Reference in New Issue
Block a user