1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 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 "socketengine.h"
21 #include "treeserver.h"
22 #include "treesocket.h"
24 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
26 bool TreeSocket::LocalPing(const std::string &prefix, parameterlist ¶ms)
28 if (params.size() < 1)
30 if (params.size() == 1)
32 std::string stufftobounce = params[0];
33 this->WriteLine(std::string(":")+ServerInstance->Config->GetSID()+" PONG "+stufftobounce);
38 std::string forwardto = params[1];
39 if (forwardto == ServerInstance->Config->ServerName || forwardto == ServerInstance->Config->GetSID())
41 // this is a ping for us, send back PONG to the requesting server
42 params[1] = params[0];
43 params[0] = forwardto;
44 Utils->DoOneToOne(forwardto,"PONG",params,params[1]);
48 // not for us, pass it on :)
49 Utils->DoOneToOne(prefix,"PING",params,forwardto);