X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fservercommand.cpp;h=5473ef077143d7f92056436fcbf8df409ea41cbc;hb=c71361e8e4f22cb4f72881399bce2832eb080b0e;hp=fe5a38a9e472cc62f4bd6ac1ccb33e1a6256be25;hpb=b14ebbccf08ec34a73e1ba271e67da80d9fe805c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/servercommand.cpp b/src/modules/m_spanningtree/servercommand.cpp index fe5a38a9e..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,16 +25,28 @@ ServerCommand::ServerCommand(Module* Creator, const std::string& Name, unsigned int MinParams, unsigned int MaxParams) : CommandBase(Creator, Name, MinParams, MaxParams) { - 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);