A bit better module config
This commit is contained in:
parent
647b8f3072
commit
98bfab4ba5
13 changed files with 67 additions and 45 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue