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"
24 #include "treesocket.h"
26 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */
28 bool TreeSocket::Stats(const std::string &prefix, parameterlist ¶ms)
30 /* Get the reply to a STATS query if it matches this servername,
31 * and send it back as a load of PUSH queries
33 if (params.size() > 1)
35 if (InspIRCd::Match(ServerInstance->Config->ServerName, params[1]))
37 /* It's for our server */
39 User* source = ServerInstance->FindNick(prefix);
43 par.push_back(prefix);
45 ServerInstance->DoStats(params[0][0], source, results);
46 for (size_t i = 0; i < results.size(); i++)
48 par[1] = "::" + results[i];
49 Utils->DoOneToOne(ServerInstance->Config->GetSID(), "PUSH",par, source->server);
56 User* source = ServerInstance->FindNick(prefix);
58 Utils->DoOneToOne(source->uuid, "STATS", params, params[1]);