Fix config updating and make plugin dbs somewhat configurable

This commit is contained in:
Tulir Asokan 2018-10-22 01:57:29 +03:00
parent 485040e687
commit 894c5df07b
6 changed files with 24 additions and 9 deletions

View file

@ -27,7 +27,7 @@ from .db import Base, init as init_db
from .server import MaubotServer
from .client import Client, init as init_client
from .loader import ZippedPluginLoader
from .plugin import PluginInstance
from .plugin import PluginInstance, init as init_plugin_instance_class
from .__meta__ import __version__
parser = argparse.ArgumentParser(description="A plugin-based Matrix bot system.",
@ -57,6 +57,7 @@ loop = asyncio.get_event_loop()
init_db(db_session)
init_client(loop)
init_plugin_instance_class(config)
server = MaubotServer(config, loop)
ZippedPluginLoader.load_all(*config["plugin_directories"])
plugins = PluginInstance.all()