diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/commands.h | 14 | ||||
-rw-r--r-- | src/modules/m_spanningtree/compat.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/sinfo.cpp | 36 |
4 files changed, 55 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h index 7ecdaeadc..2554c689e 100644 --- a/src/modules/m_spanningtree/commands.h +++ b/src/modules/m_spanningtree/commands.h @@ -347,6 +347,19 @@ class CommandEndBurst : public ServerOnlyServerCommand<CommandEndBurst> CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters); }; +class CommandSInfo : public ServerOnlyServerCommand<CommandSInfo> +{ + public: + CommandSInfo(Module* Creator) : ServerOnlyServerCommand<CommandSInfo>(Creator, "SINFO", 2) { } + CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters); + + class Builder : public CmdBuilder + { + public: + Builder(TreeServer* server, const char* type, const std::string& value); + }; +}; + class SpanningTreeCommands { public: @@ -380,5 +393,6 @@ class SpanningTreeCommands CommandVersion version; CommandBurst burst; CommandEndBurst endburst; + CommandSInfo sinfo; SpanningTreeCommands(ModuleSpanningTree* module); }; diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index 9d3c52bd2..5893a09fd 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -244,6 +244,10 @@ void TreeSocket::WriteLine(const std::string& original_line) line.erase(d, e-d); } } + else if (command == "SINFO") + { + return; + } } ServerInstance->Logs->Log(MODNAME, LOG_RAWIO, "S[%d] O %s", this->GetFd(), line.c_str()); this->WriteData(line); diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 5bf4583a4..59937cc6a 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -51,7 +51,7 @@ SpanningTreeCommands::SpanningTreeCommands(ModuleSpanningTree* module) away(module), addline(module), delline(module), encap(module), idle(module), nick(module), ping(module), pong(module), push(module), save(module), server(module), squit(module), snonotice(module), version(module), - burst(module), endburst(module) + burst(module), endburst(module), sinfo(module) { } diff --git a/src/modules/m_spanningtree/sinfo.cpp b/src/modules/m_spanningtree/sinfo.cpp new file mode 100644 index 000000000..71bd48b44 --- /dev/null +++ b/src/modules/m_spanningtree/sinfo.cpp @@ -0,0 +1,36 @@ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com> + * + * 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 + * License as published by the Free Software Foundation, version 2. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "inspircd.h" + +#include "treeserver.h" +#include "commands.h" + +CmdResult CommandSInfo::HandleServer(TreeServer* server, std::vector<std::string>& params) +{ + const std::string& key = params.front(); + const std::string& value = params.back(); + + return CMD_SUCCESS; +} + +CommandSInfo::Builder::Builder(TreeServer* server, const char* key, const std::string& val) + : CmdBuilder(server->GetID(), "SINFO") +{ + push(key).push_last(val); +} |