Fix double messages and regPing logic
This commit is contained in:
parent
553e2eb2b7
commit
af1dba5741
17
core/bot.py
17
core/bot.py
|
@ -640,20 +640,23 @@ class IRCBot(IRCClient):
|
||||||
if reset:
|
if reset:
|
||||||
self._negativePass = None
|
self._negativePass = None
|
||||||
|
|
||||||
if self._negativePass is not True:
|
if self._negativePass is None:
|
||||||
|
# We have failed, the blacklisted message has been found
|
||||||
if negativepass is False:
|
if negativepass is False:
|
||||||
self._negativePass = False
|
self._negativePass = False
|
||||||
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
|
||||||
if negativepass is True:
|
if negativepass is True:
|
||||||
if self._negativePass is None:
|
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}")
|
||||||
if sinst["ping"]:
|
# if sinst["ping"]:
|
||||||
debug("Sending ping - %s - %i" % (self.net, self.num))
|
# debug("Sending ping - %s - %i" % (self.net, self.num))
|
||||||
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']}'
|
||||||
return
|
# to {sinst['entity']} - {self.num}")
|
||||||
|
# return
|
||||||
else:
|
else:
|
||||||
debug(f"regPing() {self.net}: negative registration check - {self.num}")
|
debug(f"regPing() {self.net}: negative registration check - {self.num}")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue