mirror of
https://github.com/sys-fs/seddy
synced 2024-11-22 19:59:55 -05:00
Fix PING response
This commit is contained in:
parent
51b66366ee
commit
65417b187a
6
seddy.py
6
seddy.py
@ -92,6 +92,9 @@ if __name__ == "__main__":
|
|||||||
for line in receive:
|
for line in receive:
|
||||||
msg = parse_msg.search(line)
|
msg = parse_msg.search(line)
|
||||||
if msg is None:
|
if msg is None:
|
||||||
|
if 'PING' in line:
|
||||||
|
send.write('PONG\r\n')
|
||||||
|
send.flush()
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
msg = msg.group(1)
|
msg = msg.group(1)
|
||||||
@ -101,9 +104,6 @@ if __name__ == "__main__":
|
|||||||
if 'PRIVMSG' in line and not is_sed.match(msg):
|
if 'PRIVMSG' in line and not is_sed.match(msg):
|
||||||
history.enqueue(msg)
|
history.enqueue(msg)
|
||||||
|
|
||||||
if 'PING' in line:
|
|
||||||
send.write('PONG\r\n')
|
|
||||||
send.flush()
|
|
||||||
if '.bots' in msg[:5] or '.bot ' + nick in msg[:5 + len(nick)]:
|
if '.bots' in msg[:5] or '.bot ' + nick in msg[:5 + len(nick)]:
|
||||||
notice("I was written to correct your mistakes.")
|
notice("I was written to correct your mistakes.")
|
||||||
if '.source ' + nick in msg[:8 + len(nick)]:
|
if '.source ' + nick in msg[:8 + len(nick)]:
|
||||||
|
Loading…
Reference in New Issue
Block a user