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 * ---------------------------------------------------
17 #include "../transport.h"
18 #include "socketengine.h"
22 #include "treeserver.h"
23 #include "treesocket.h"
25 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
27 bool TreeSocket::ServicePart(const std::string &prefix, parameterlist ¶ms)
29 if (params.size() < 2)
32 std::string reason = "Services forced part";
34 if (params.size() == 3)
37 User* u = ServerInstance->FindNick(params[0]);
38 Channel* c = ServerInstance->FindChan(params[1]);
42 /* only part if it's local, otherwise just pass it on! */
44 if (!c->PartUser(u, reason))
46 Utils->DoOneToAllButSender(prefix,"SVSPART",params,prefix);