diff options
-rw-r--r-- | src/commands/cmd_kill.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/kill.cpp | 53 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 4 |
3 files changed, 4 insertions, 57 deletions
diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp index e7a80400a..17d4c6629 100644 --- a/src/commands/cmd_kill.cpp +++ b/src/commands/cmd_kill.cpp @@ -31,6 +31,10 @@ class CommandKill : public Command * @return A value from CmdResult to indicate command success or failure. */ CmdResult Handle(const std::vector<std::string>& parameters, User *user); + RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) + { + return ROUTE_BROADCAST; + } }; /** Handle /KILL diff --git a/src/modules/m_spanningtree/kill.cpp b/src/modules/m_spanningtree/kill.cpp deleted file mode 100644 index d01305cfc..000000000 --- a/src/modules/m_spanningtree/kill.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - - -#include "inspircd.h" -#include "xline.h" - -#include "treesocket.h" -#include "treeserver.h" -#include "utils.h" - -/* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ - - - -bool TreeSocket::RemoteKill(const std::string &prefix, parameterlist ¶ms) -{ - if (params.size() != 2) - return true; - - User* who = ServerInstance->FindNick(params[0]); - - if (who) - { - /* Prepend kill source, if we don't have one */ - if (*(params[1].c_str()) != 'K') - { - params[1] = "Killed (" + params[1] +")"; - } - std::string reason = params[1]; - params[1] = ":" + params[1]; - Utils->DoOneToAllButSender(prefix,"KILL",params,prefix); - TreeServer* src = Utils->FindServer(prefix); - if (src) - { - // this shouldn't ever be null, but it doesn't hurt to check - who->Write(":%s KILL %s :%s (%s)", src->GetName().c_str(), who->nick.c_str(), src->GetName().c_str(), reason.c_str()); - } - ServerInstance->Users->QuitUser(who, reason); - } - return true; -} - diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 1eefc500e..5cd935eb9 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -262,10 +262,6 @@ class TreeSocket : public BufferedSocket */ bool OperQuit(const std::string &prefix, parameterlist ¶ms); - /** KILL - */ - bool RemoteKill(const std::string &prefix, parameterlist ¶ms); - /** PONG */ bool LocalPong(const std::string &prefix, parameterlist ¶ms); |