diff options
| author | 2017-01-27 21:41:47 +0000 | |
|---|---|---|
| committer | 2017-01-27 21:41:47 +0000 | |
| commit | fd75b712868b30ebb74714875c8d7437e4a1dbd6 (patch) | |
| tree | 6372f7179440020e16ee977102d98d349390bd55 /start.py | |
| parent | Add get_user_status func to IRCChannel (diff) | |
Adds args.verbose and fixes a couple of bug
Diffstat (limited to 'start.py')
| -rwxr-xr-x | start.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -13,6 +13,8 @@ arg_parser.add_argument("--config", "-c", default="bot.json", help="Location of the JSON config file") arg_parser.add_argument("--database", "-d", default="bot.db", help="Location of the sqlite3 database file") +arg_parser.add_argument("--verbose", "-v", action="store_true") + args = arg_parser.parse_args() bot = IRCBot.Bot() @@ -20,6 +22,7 @@ database = Database.Database(bot, args.database) config_object = Config.Config(bot, args.config) bot.database = database bot.config_object = config_object +bot.args = args bot.modules.load_modules() servers = database.get_servers() @@ -28,8 +31,8 @@ for server in servers: if len(bot.servers): bot.events.on("boot").on("done").call() time.sleep(5) - bot.connect_all() - bot.run() + if bot.connect_all(): + bot.run() else: try: if bool_input("no servers found, add one?"): |
