From 2b0dd0f74639423045325968c41b778c4b0fdc4d Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 25 Jun 2016 12:18:50 -0700 Subject: [PATCH] ctcp: allow PING with multiple arguments --- plugins/ctcp.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/ctcp.py b/plugins/ctcp.py index 3ef5216..1c1aedb 100644 --- a/plugins/ctcp.py +++ b/plugins/ctcp.py @@ -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):