Improved config options, added stayalive code from biGGer

This commit is contained in:
Luke Rogers 2012-02-17 13:32:27 +13:00
parent d5fd951a39
commit dd0cec62bc
3 changed files with 13 additions and 3 deletions

View file

@ -49,6 +49,14 @@ def onjoin(paraml, conn=None, bot=None):
http.ua_skybot = 'CloudBot'
# stayalive code
stayalive = conn.conf.get('stayalive')
if stayalive:
while True:
time.sleep(conn.conf.get('stayalive_delay', 20))
conn.cmd('PING', [conn.nick])
@hook.regex(r'^\x01VERSION\x01$')
def version(inp, notice=None):