1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
18 #include "treesocket.h"
19 #include "treeserver.h"
22 /* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
26 bool TreeSocket::RemoteKill(const std::string &prefix, std::deque<std::string> ¶ms)
28 if (params.size() != 2)
31 User* who = this->ServerInstance->FindNick(params[0]);
35 /* Prepend kill source, if we don't have one */
36 if (*(params[1].c_str()) != 'K')
38 params[1] = "Killed (" + params[1] +")";
40 std::string reason = params[1];
41 params[1] = ":" + params[1];
42 Utils->DoOneToAllButSender(prefix,"KILL",params,prefix);
43 TreeServer* src = Utils->FindServer(prefix);
46 // this shouldn't ever be null, but it doesn't hurt to check
47 who->Write(":%s KILL %s :%s (%s)", src->GetName().c_str(), who->nick.c_str(), src->GetName().c_str(), reason.c_str());
49 this->ServerInstance->Users->QuitUser(who, reason);