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::LocalPing(const std::string &prefix, parameterlist ¶ms)
29 if (params.size() < 1)
31 if (params.size() == 1)
33 std::string stufftobounce = params[0];
34 this->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" PONG "+stufftobounce);
39 std::string forwardto = params[1];
40 if (forwardto == ServerInstance->Config->ServerName || forwardto == ServerInstance->Config->GetSID())
42 // this is a ping for us, send back PONG to the requesting server
43 params[1] = params[0];
44 params[0] = forwardto;
45 Utils->DoOneToOne(forwardto,"PONG",params,params[1]);
49 // not for us, pass it on :)
50 Utils->DoOneToOne(prefix,"PING",params,forwardto);