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);
}