diff --git a/dr.botzo.py b/dr.botzo.py index 1c498da..77fec59 100644 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -76,10 +76,15 @@ class DrBotIRC(irclib.IRC): self.connections.append(c) return c +# check argv +if len(sys.argv) != 2: + sys.exit("Needs one argument, the config filename") + # read config file config = ConfigParser({'debug': 'false'}) -config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg']) +#config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg']) +config.read(os.path.expanduser(sys.argv[1])) # load necessary options try: