This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
2012-04-02 18:32:21 +02:00
|
|
|
import time
|
2012-02-29 03:32:01 +01:00
|
|
|
from util import hook
|
|
|
|
|
2012-02-29 06:47:11 +01:00
|
|
|
|
2012-02-29 03:32:01 +01:00
|
|
|
# CTCP responses
|
|
|
|
@hook.regex(r'^\x01VERSION\x01$')
|
2013-09-04 12:59:58 +02:00
|
|
|
def ctcp_version(inp, notice=None):
|
2012-03-20 07:58:04 +01:00
|
|
|
notice('\x01VERSION: CloudBot - http://git.io/cloudbotirc')
|
2012-02-29 06:47:11 +01:00
|
|
|
|
|
|
|
|
2012-02-29 03:32:01 +01:00
|
|
|
@hook.regex(r'^\x01PING\x01$')
|
2013-09-04 12:59:58 +02:00
|
|
|
def ctcp_ping(inp, notice=None):
|
2012-02-29 03:32:01 +01:00
|
|
|
notice('\x01PING: PONG')
|
2012-02-29 06:47:11 +01:00
|
|
|
|
|
|
|
|
2012-02-29 03:32:01 +01:00
|
|
|
@hook.regex(r'^\x01TIME\x01$')
|
2013-09-04 12:59:58 +02:00
|
|
|
def ctcp_time(inp, notice=None):
|
2013-09-05 03:46:49 +02:00
|
|
|
notice('\x01TIME: The time is: {}'.format(time.strftime("%r", time.localtime())))
|