X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fservercommand.cpp;h=5473ef077143d7f92056436fcbf8df409ea41cbc;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;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..5473ef077 100644 --- a/src/modules/m_spanningtree/servercommand.cpp +++ b/src/modules/m_spanningtree/servercommand.cpp @@ -1,7 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013 Attila Molnar + * Copyright (C) 2018 Sadie Powell + * Copyright (C) 2013-2015 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -24,17 +25,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);