Skip to content

Commit d19e0de

Browse files
committed
Fix CTCP ping
1 parent cd37ad1 commit d19e0de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

motobot/core_plugins/ctcp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ def ctcp_match(bot, context, message, match):
88
'VERSION': 'MotoBot Version ' + __VERSION__,
99
'FINGER': 'Oh you dirty man!',
1010
'TIME': strftime('%a %b %d %H:%M:%S UTC', gmtime()),
11-
'PING': message
11+
'PING': message.strip('\x01')
1212
}
1313
try:
14-
ctcp_req = match.group(1)
14+
ctcp_req = match.group(1).split(' ', 1)[0]
1515
reply = ctcp_response[ctcp_req]
16-
response = (reply, Notice(context.nick), Eat)
16+
response = ('\x01{}\x01'.format(reply), Notice(context.nick), Eat)
1717
except KeyError:
1818
response = None
1919
return response

0 commit comments

Comments
 (0)