1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

conf() added; source command added

This commit is contained in:
urlbot
2014-09-14 12:26:39 +02:00
parent 3b1783011f
commit c5a73aaf62
3 changed files with 18 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import sys, os, re, time, urllib, pickle, random, HTMLParser
from local_config import conf
BUFSIZ = 8192
delay = 0.100 # seconds
@@ -211,13 +212,15 @@ def parse_commands(data):
return False
if 'command' in data:
chat_write(reply_user + (""": known commands: 'command', 'info', 'hangup', 'ping', 'uptime', 'version'"""))
chat_write(reply_user + (""": known commands: 'command', 'info', 'hangup', 'ping', 'uptime', 'source', 'version'"""))
elif 'version' in data:
chat_write(reply_user + (''': I'm running ''' + VERSION))
elif 'unikot' in data:
chat_write(reply_user + (u''': ┌────────┐'''))
chat_write(reply_user + (u''': │Unicode!│'''))
chat_write(reply_user + (u''': └────────┘'''))
elif 'source' in data:
chat_write('My source code can be found at %s' % conf('src-url'))
elif 'uptime' in data:
u = int(uptime + time.time())
plural_uptime = 's'