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 "treesocket.h"
18 #include "treeserver.h"
21 /* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
26 void TreeSocket::Encap(User* who, parameterlist ¶ms)
28 if (params.size() > 1)
30 if (InspIRCd::Match(ServerInstance->Config->GetSID(), params[0]))
32 parameterlist plist(params.begin() + 2, params.end());
33 ServerInstance->CallCommandHandler(params[1].c_str(), plist, who);
34 // discard return value, ENCAP shall succeed even if the command does not exist
37 params[params.size() - 1] = ":" + params[params.size() - 1];
39 if (params[0].find('*') != std::string::npos)
41 Utils->DoOneToAllButSender(who->server, "ENCAP", params, who->server);
44 Utils->DoOneToOne(who->server, "ENCAP", params, params[0]);