Make sure we respond to ping.
This commit is contained in:
parent
70379d7c3e
commit
211598633f
@ -156,6 +156,13 @@ class Bot:
|
||||
if ready_to_read:
|
||||
last_read = datetime.utcnow()
|
||||
irc_msg = self.msg_handler()
|
||||
|
||||
# If the server pings us then we've got to respond!
|
||||
if irc_msg.find("PING :") != -1:
|
||||
self.pong(irc_msg)
|
||||
LOGGER.info("Responding to ping message: {}".format(irc_msg))
|
||||
continue
|
||||
|
||||
irc_msg, actor, channel = parse_irc_messages(irc_msg)
|
||||
|
||||
if irc_msg is not None:
|
||||
@ -208,10 +215,6 @@ class Bot:
|
||||
self._check_project_updates(channel)
|
||||
self.send_privmsg(channel, "Fait !")
|
||||
|
||||
# If the server pings us then we've got to respond!
|
||||
if irc_msg.find("PING :") != -1:
|
||||
self.pong(irc_msg)
|
||||
|
||||
# Responds to a user that inputs "Hello Mybot".
|
||||
def bot_hello(self, channel: str, greeting: str) -> None:
|
||||
self.send_privmsg(channel, greeting)
|
||||
|
Loading…
Reference in New Issue
Block a user