Use new startup.py

master
sfan5 2013-05-09 21:16:00 +02:00
parent d7792fef64
commit c75e64f170
1 changed files with 5 additions and 10 deletions

View File

@ -10,6 +10,7 @@ http://inamidst.com/phenny/
import threading, time
def setup(phenny):
print("Setting up phenny")
# by clsn
phenny.data = {}
refresh_delay = 300.0
@ -42,19 +43,13 @@ def setup(phenny):
pong.rule = r'.*'
phenny.variables['pong'] = pong
# Need to wrap handle_connect to start the loop.
inner_handle_connect = phenny.handle_connect
def outer_handle_connect():
inner_handle_connect()
if phenny.data.get('startup.setup.pingloop'):
phenny.data['startup.setup.pingloop']()
phenny.handle_connect = outer_handle_connect
def startup(phenny, input):
import time
# Start the ping loop. Has to be done after USER on e.g. quakenet
if phenny.data.get('startup.setup.pingloop'):
phenny.data['startup.setup.pingloop']()
if hasattr(phenny.config, 'serverpass'):
phenny.write(('PASS', phenny.config.serverpass))