A bit better module config

This commit is contained in:
Blue 2025-03-31 13:02:45 +03:00
parent 647b8f3072
commit 98bfab4ba5
Signed by: blue
GPG key ID: 9B203B252A63EE38
13 changed files with 67 additions and 45 deletions

View file

@ -7,10 +7,12 @@
#include "gloox/message.h"
Module::Module::Module(const std::shared_ptr<Core>& core, const Shared::Permissions& permissions, const std::string& name):
Shared::Loggable(core->logger, {"Module", name}),
Module::Module::Module(const std::shared_ptr<Core>& core, const Config::Module& conf, const std::string& name):
Shared::Loggable(core->logger, {"Module", name, conf.alias}),
name(name),
alias(conf.alias),
core(core),
permissions(permissions)
permissions(conf.permissions)
{}
bool Module::Module::hasPermission(const std::string& permission, const std::shared_ptr<::Actor>& actor) const {