moved ctcps arround

This commit is contained in:
neersighted 2012-02-28 18:32:01 -08:00
parent 2dc5ec7419
commit 068ccab86b
2 changed files with 19 additions and 17 deletions

19
plugins/ctcp.py Normal file
View file

@ -0,0 +1,19 @@
from util import hook
# CTCP responses
@hook.regex(r'^\x01VERSION\x01$')
def ctcpversion(inp, notice=None):
notice('\x01VERSION: CloudBot - http://git.io/cloudbot')
@hook.regex(r'^\x01PING\x01$')
def ctcpping(inp, notice=None):
notice('\x01PING: PONG')
@hook.regex(r'^\x01TIME\x01$')
def ctcptime(inp, notice=None):
notice('\x01TIME: GET A WATCH')
@hook.regex(r'^\x01FINGER\x01$')
def ctcpfinger(inp, notice=None):
notice('\x01FINGER: WHERE ARE YOU PUTTING THAT')

View file

@ -55,20 +55,3 @@ def onjoin(paraml, conn=None, bot=None):
while True:
time.sleep(conn.conf.get('stayalive_delay', 20))
conn.cmd('PING', [conn.nick])
# CTCPs
@hook.regex(r'^\x01VERSION\x01$')
def ctcpversion(inp, notice=None):
notice('\x01VERSION: CloudBot - http://git.io/cloudbot')
@hook.regex(r'^\x01PING\x01$')
def ctcpping(inp, notice=None):
notice('\x01PING: PONG')
@hook.regex(r'^\x01TIME\x01$')
def ctcptime(inp, notice=None):
notice('\x01TIME: GET A WATCH')
@hook.regex(r'^\x01FINGER\x01$')
def ctcpfinger(inp, notice=None):
notice('\x01FINGER: WHERE ARE YOU PUTTING THAT')