3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

ctcp: allow PING with multiple arguments

This commit is contained in:
James Lu 2016-06-25 12:18:50 -07:00
parent 3461216d20
commit 2b0dd0f746

View File

@ -19,12 +19,8 @@ def handle_ctcpping(irc, source, args):
Handles CTCP ping requests.
"""
# CTCP PING 23152511
try:
pingarg = args[0]
except IndexError:
# Malformed ping request; ignore it.
return
irc.msg(source, '\x01PING %s\x01' % args[0], notice=True)
pingarg = ' '.join(args).strip('\x01')
irc.msg(source, '\x01PING %s\x01' % pingarg, notice=True)
utils.add_cmd(handle_ctcpping, '\x01ping')
def handle_ctcpeaster(irc, source, args):