diff --git a/dr.botzo.cfg b/dr.botzo.cfg index 87e2c3f..dacfc90 100644 --- a/dr.botzo.cfg +++ b/dr.botzo.cfg @@ -1,6 +1,7 @@ [IRC] server = irc.foonetic.net port = 6667 -channel = #lh +channel = #bss nick = dr_devzo name = dr. devzo +debug = true diff --git a/dr.botzo.py b/dr.botzo.py index 3e30534..ea552ea 100755 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -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