bug fix
This commit is contained in:
@@ -5,6 +5,9 @@ from socket import socket
|
|||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
from os import chdir, path
|
||||||
|
|
||||||
|
chdir(path.dirname(path.abspath(__file__)))
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
# Defaults
|
# Defaults
|
||||||
config['Global'] = {'check_delay': '5 * 60', # every 5 min
|
config['Global'] = {'check_delay': '5 * 60', # every 5 min
|
||||||
@@ -38,7 +41,7 @@ irc.connect(config['Global']['IRC_host'], int(config['Global']['IRC_port']), con
|
|||||||
irc.add_global_handler("welcome", on_connect)
|
irc.add_global_handler("welcome", on_connect)
|
||||||
irc.add_global_handler("join", on_join)
|
irc.add_global_handler("join", on_join)
|
||||||
irc.add_global_handler('disconnect', on_disconnect)
|
irc.add_global_handler('disconnect', on_disconnect)
|
||||||
Thread(target=reactor.process_forever).start()
|
Thread(target=reactor.process_forever).start() #start irc client in other thread
|
||||||
##
|
##
|
||||||
hosts = config._sections
|
hosts = config._sections
|
||||||
check_delay = eval(config['Global']['check_delay'])
|
check_delay = eval(config['Global']['check_delay'])
|
||||||
|
|||||||
Reference in New Issue
Block a user