diff options
| author | 2019-10-11 14:00:26 +0100 | |
|---|---|---|
| committer | 2019-10-11 14:00:26 +0100 | |
| commit | cefde48e42d68eeb25e83185586ef4ebf40516ed (patch) | |
| tree | 393582bd5f6723e7841eeddc38c1a78242154a1b /start.py | |
| parent | LockFile doesn't need to hold on to _database_location (diff) | |
| signature | ||
first draft of infrastructure for unix domain control socket
Diffstat (limited to 'start.py')
| -rwxr-xr-x | start.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -7,7 +7,7 @@ if sys.version_info < (3, 6): sys.exit(1) import atexit, argparse, faulthandler, os, platform, time -from src import Cache, Config, Database, EventManager, Exports, IRCBot +from src import Cache, Config, Control, Database, EventManager, Exports, IRCBot from src import LockFile, Logging, ModuleManager, Timers, utils faulthandler.enable() @@ -96,6 +96,9 @@ events = EventManager.EventRoot(log).wrap() exports = Exports.Exports() timers = Timers.Timers(database, events, log) +control = Control.Control(events, args.database) +control.bind() + module_directories = [os.path.join(directory, "modules")] if args.external: module_directories.append(os.path.abspath(args.external)) @@ -111,6 +114,8 @@ bot.add_poll_hook(cache) bot.add_poll_hook(lock_file) bot.add_poll_hook(timers) +bot.add_poll_source(control) + if args.module: definition = modules.find_module(args.module) module = modules.load_module(bot, definition) |
