3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-26 04:32: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. Handles CTCP ping requests.
""" """
# CTCP PING 23152511 # CTCP PING 23152511
try: pingarg = ' '.join(args).strip('\x01')
pingarg = args[0] irc.msg(source, '\x01PING %s\x01' % pingarg, notice=True)
except IndexError:
# Malformed ping request; ignore it.
return
irc.msg(source, '\x01PING %s\x01' % args[0], notice=True)
utils.add_cmd(handle_ctcpping, '\x01ping') utils.add_cmd(handle_ctcpping, '\x01ping')
def handle_ctcpeaster(irc, source, args): def handle_ctcpeaster(irc, source, args):