diff options
| author | 2019-09-27 16:18:12 +0100 | |
|---|---|---|
| committer | 2019-09-27 16:18:12 +0100 | |
| commit | 69bf622d2d72be70a1db9b12f9a5a7c5cca9d76c (patch) | |
| tree | 4b7d65453061bdd7d4fd9e95f5f4f7afc3641386 /start.py | |
| parent | Revert "add !msg" (diff) | |
| signature | ||
remove external_modules/ and replace with bot.conf and cli arg
Diffstat (limited to 'start.py')
| -rwxr-xr-x | start.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -42,6 +42,7 @@ arg_parser.add_argument("--module", "-m", help="Execute an action against a specific module") arg_parser.add_argument("--module-args", "-M", help="Arguments to give in action against a specific module") +arg_parser.add_argument("--external", "-e", help="External modules directory") arg_parser.add_argument("--startup-disconnects", "-D", help="Tolerate failed connections on startup", action="store_true") @@ -87,8 +88,12 @@ events = EventManager.EventRoot(log).wrap() exports = Exports.Exports() timers = Timers.Timers(database, events, log) -module_directories = [os.path.join(directory, "modules"), - os.path.join(directory, "external_modules")] +module_directories = [os.path.join(directory, "modules")] +if args.external: + module_directories.append(os.path.abspath(args.external)) +if "external-modules" in config: + module_directories.append(os.path.abspath(config["external-modules"])) + modules = ModuleManager.ModuleManager(events, exports, timers, config, log, module_directories) |
