Merge pull request #92 from brosquinha/master

Support multi-module plugins
This commit is contained in:
AllinolCP 2024-03-27 18:16:43 +07:00 committed by GitHub
commit 2af6216cbb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,10 @@ class PluginManager(_AbstractManager):
await self.load(plugin_package)
async def load(self, module):
try:
plugin_class, plugin_type = inspect.getmembers(module, is_plugin).pop()
except IndexError:
return
plugin_index = plugin_class.lower()
if self.server.config.plugins != '*' and \