diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-12-06 12:16:37 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-12-06 12:16:37 +0100 |
commit | d1bb97f3fb3fea1bf2de6a1eacaa2cdd6baacc07 (patch) | |
tree | aac80f5c66c730cbdceb822280086713f225d9f1 /src | |
parent | 7343ac33fbc64fd6d4426da4203530c3aef95e29 (diff) |
m_spanningtree Implement ServerCommand::RegisterService()
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/servercommand.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_spanningtree/servercommand.h | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/servercommand.cpp b/src/modules/m_spanningtree/servercommand.cpp index 3034eee7a..ef55cd00e 100644 --- a/src/modules/m_spanningtree/servercommand.cpp +++ b/src/modules/m_spanningtree/servercommand.cpp @@ -24,8 +24,11 @@ ServerCommand::ServerCommand(Module* Creator, const std::string& Name, unsigned int MinParams, unsigned int MaxParams) : CommandBase(Creator, Name, MinParams, MaxParams) { - this->ServiceProvider::DisableAutoRegister(); - ModuleSpanningTree* st = static_cast<ModuleSpanningTree*>(Creator); +} + +void ServerCommand::RegisterService() +{ + ModuleSpanningTree* st = static_cast<ModuleSpanningTree*>(static_cast<Module*>(creator)); st->CmdManager.AddCommand(this); } diff --git a/src/modules/m_spanningtree/servercommand.h b/src/modules/m_spanningtree/servercommand.h index 524520a88..07dfc4898 100644 --- a/src/modules/m_spanningtree/servercommand.h +++ b/src/modules/m_spanningtree/servercommand.h @@ -38,6 +38,10 @@ class ServerCommand : public CommandBase public: ServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0); + /** Register this object in the ServerCommandManager + */ + void RegisterService() CXX11_OVERRIDE; + virtual CmdResult Handle(User* user, std::vector<std::string>& parameters) = 0; virtual RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters); |