diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-11 06:56:51 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-11 06:56:51 +0000 |
commit | baa663e5156d557b3771b8ef025f279d0ac4709c (patch) | |
tree | ec9fa4d921fdfa201819bebe4a5226092d5ef330 /src/modules | |
parent | 7cc4e61f0edf9e45b5db415bdc6ed7bf5ed36c39 (diff) |
Fix routing of KILL command when sourced from a server
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12432 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/kill.cpp | 53 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 4 |
2 files changed, 0 insertions, 57 deletions
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); |