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

@ -14,12 +14,13 @@
#include "shared/loggable.h"
#include "component/core.h"
#include "component/actor.h"
#include "component/config.h"
namespace Module {
class Module : protected Shared::Loggable {
protected:
Module(const std::shared_ptr<Core>& core, const Shared::Permissions& permissions, const std::string& name);
Module(const std::shared_ptr<Core>& core, const Config::Module& conf, const std::string& name);
bool hasPermission(const std::string& permission, const std::shared_ptr<::Actor>& actor) const;
@ -30,6 +31,10 @@ public:
virtual Shared::Result message(const std::shared_ptr<::Actor>& actor, const Shared::Strings& args) = 0;
public:
const std::string name;
const std::string alias;
protected:
std::shared_ptr<Core> core;
Shared::Permissions permissions;