diff --git a/omnibot/bot.py b/omnibot/bot.py index 8f83d88..1d0a3bd 100644 --- a/omnibot/bot.py +++ b/omnibot/bot.py @@ -45,6 +45,8 @@ class Bot: self.server_config.port, self.server_config.use_ssl, ) + log.info("Initializing plugins") + await asyncio.gather(*[plugin.on_load() for plugin in self.plugins]) self.connection = IrcProtocol([server], self.server_config.nick, loop=loop) # Register events # self.connection.register("*", self.on_message) diff --git a/omnibot/plugin.py b/omnibot/plugin.py index 68784b5..48ee2a0 100644 --- a/omnibot/plugin.py +++ b/omnibot/plugin.py @@ -51,6 +51,9 @@ class Plugin: async def on_message(self, conn: IrcProtocol, channel: str, who: Prefix, line: str): pass + async def on_load(self): + pass + async def on_unload(self, conn: IrcProtocol): pass