mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
m_spanningtree Implement ServerCommand::RegisterService()
This commit is contained in:
parent
7343ac33fb
commit
d1bb97f3fb
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user