diff options
| author | 2013-07-15 13:40:22 +0200 | |
|---|---|---|
| committer | 2013-08-18 15:11:02 +0200 | |
| commit | b14ebbccf08ec34a73e1ba271e67da80d9fe805c (patch) | |
| tree | 012640699b3960940af3756ef1e881747b0aa8d1 /src/modules/m_spanningtree/push.cpp | |
| parent | Create the CommandBase class from Command (diff) | |
m_spanningtree Move all server-to-server command handlers into handler classes
These commands are not registered in or called by the core. When looking for the handler of a command a new command table is searched first which contains all server-to-server commands. If a handler cannot be found in there, the core command table is consulted.
Diffstat (limited to 'src/modules/m_spanningtree/push.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/push.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/modules/m_spanningtree/push.cpp b/src/modules/m_spanningtree/push.cpp index 05b5d68de..a265e0d2e 100644 --- a/src/modules/m_spanningtree/push.cpp +++ b/src/modules/m_spanningtree/push.cpp @@ -20,25 +20,17 @@ #include "inspircd.h" #include "utils.h" -#include "treesocket.h" +#include "commands.h" -bool TreeSocket::Push(const std::string &prefix, parameterlist ¶ms) +CmdResult CommandPush::Handle(User* user, std::vector<std::string>& params) { - if (params.size() < 2) - return true; User* u = ServerInstance->FindNick(params[0]); if (!u) - return true; + return CMD_FAILURE; if (IS_LOCAL(u)) { u->Write(params[1]); } - else - { - // continue the raw onwards - params[1] = ":" + params[1]; - Utils->DoOneToOne(prefix,"PUSH",params,u->server); - } - return true; + return CMD_SUCCESS; } |
