X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fservercommand.cpp;h=2f5c7ea3ea94f4832c3f06b3e96064665009966f;hb=b4599531f97a9e6207b6bb8d728d7523b6995523;hp=016788f51642d8b3d9cb7deea99665c46f53ab19;hpb=992674362c5f64bdb8e1942eeaa7612524529cd6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/servercommand.cpp b/src/modules/m_spanningtree/servercommand.cpp index 016788f51..2f5c7ea3e 100644 --- a/src/modules/m_spanningtree/servercommand.cpp +++ b/src/modules/m_spanningtree/servercommand.cpp @@ -24,17 +24,28 @@ 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(Creator); +} + +void ServerCommand::RegisterService() +{ + ModuleSpanningTree* st = static_cast(static_cast(creator)); st->CmdManager.AddCommand(this); } -RouteDescriptor ServerCommand::GetRouting(User* user, const std::vector& parameters) +RouteDescriptor ServerCommand::GetRouting(User* user, const Params& parameters) { // Broadcast server-to-server commands unless overridden return ROUTE_BROADCAST; } +time_t ServerCommand::ExtractTS(const std::string& tsstr) +{ + time_t TS = ConvToNum(tsstr); + if (!TS) + throw ProtocolException("Invalid TS"); + return TS; +} + ServerCommand* ServerCommandManager::GetHandler(const std::string& command) const { ServerCommandMap::const_iterator it = commands.find(command);