So apparently you do need inp.

This commit is contained in:
Fletcher Boyd 2013-09-04 18:56:58 +08:00
parent b8d9610e56
commit 2457f6da00

View file

@ -4,15 +4,15 @@ from util import hook
# CTCP responses # CTCP responses
@hook.regex(r'^\x01VERSION\x01$') @hook.regex(r'^\x01VERSION\x01$')
def ctcp_version(notice=None): def ctcp_version(inp, notice=None):
notice('\x01VERSION: CloudBot - http://git.io/cloudbotirc') notice('\x01VERSION: CloudBot - http://git.io/cloudbotirc')
@hook.regex(r'^\x01PING\x01$') @hook.regex(r'^\x01PING\x01$')
def ctcp_ping(notice=None): def ctcp_ping(inp, notice=None):
notice('\x01PING: PONG') notice('\x01PING: PONG')
@hook.regex(r'^\x01TIME\x01$') @hook.regex(r'^\x01TIME\x01$')
def ctcp_time(notice=None): def ctcp_time(inp, notice=None):
notice('\x01TIME: The time is: %s' % time.strftime("%r", time.localtime())) notice('\x01TIME: The time is: %s' % time.strftime("%r", time.localtime()))