more options loading, debug mode

tmp/79b4e7d7e0424f8155715d7c458859a1/head
Brian S. Stephan 13 years ago
parent 59d44640d7
commit e4e2014086

@ -1,6 +1,7 @@
[IRC]
server = irc.foonetic.net
port = 6667
channel = #lh
channel = #bss
nick = dr_devzo
name = dr. devzo
debug = true

@ -23,9 +23,10 @@ def on_connect(connection, event):
# read config file
config = ConfigParser()
config = ConfigParser({'debug': 'false'})
config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg'])
# load necessary options
try:
# load connection info
server = config.get('IRC', 'server')
@ -38,6 +39,9 @@ except NoSectionError as e:
except NoOptionError as e:
sys.exit("Aborted due to error with necessary configuration: " + str(e))
# load additional options
irclib.DEBUG = config.getboolean('IRC', 'debug')
# start up the IRC bot
# create IRC and server objects and connect

Loading…
Cancel
Save