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