Improve regPing negative handling logic
This commit is contained in:
parent
af1dba5741
commit
4e88b93856
|
@ -647,7 +647,7 @@ class IRCBot(IRCClient):
|
||||||
debug(f"regPing() {self.net}: negativepass is False for {self.num}")
|
debug(f"regPing() {self.net}: negativepass is False for {self.num}")
|
||||||
return
|
return
|
||||||
# End of negative output reached with no blacklisted message
|
# End of negative output reached with no blacklisted message
|
||||||
if negativepass is True:
|
elif negativepass is True:
|
||||||
if self._negativePass is None: # check if it's not failed yet
|
if self._negativePass is None: # check if it's not failed yet
|
||||||
self._negativePass = True
|
self._negativePass = True
|
||||||
debug(f"regPing() {self.net}: negpass:True positive registration check - {self.num}")
|
debug(f"regPing() {self.net}: negpass:True positive registration check - {self.num}")
|
||||||
|
@ -660,10 +660,8 @@ class IRCBot(IRCClient):
|
||||||
else:
|
else:
|
||||||
debug(f"regPing() {self.net}: negative registration check - {self.num}")
|
debug(f"regPing() {self.net}: negative registration check - {self.num}")
|
||||||
return
|
return
|
||||||
|
else:
|
||||||
if sinst["check"]:
|
|
||||||
if sinst["negative"]:
|
if sinst["negative"]:
|
||||||
self._negativePass = None
|
|
||||||
self.msg(sinst["entity"], sinst["negativemsg"])
|
self.msg(sinst["entity"], sinst["negativemsg"])
|
||||||
debug(
|
debug(
|
||||||
(
|
(
|
||||||
|
@ -674,6 +672,8 @@ class IRCBot(IRCClient):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
self._negativePass = True
|
self._negativePass = True
|
||||||
|
|
||||||
|
if sinst["check"]:
|
||||||
if sinst["ping"]:
|
if sinst["ping"]:
|
||||||
self.msg(sinst["entity"], sinst["pingmsg"])
|
self.msg(sinst["entity"], sinst["pingmsg"])
|
||||||
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}")
|
||||||
|
|
Loading…
Reference in New Issue