From 5e98adde5d5da261882dfe76b18cc2af2217a875 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 7 Aug 2007 21:44:44 +0000 Subject: Feature request from djGrr, allow changing of server to server ping frequency git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7686 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 2b159fa4e..3d472bf7a 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -485,7 +485,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) if (serv->AnsweredLastPing()) { sock->WriteLine(std::string(":")+ServerInstance->Config->ServerName+" PING "+serv->GetName()); - serv->SetNextPingTime(curtime + 60); + serv->SetNextPingTime(curtime + Utils->PingFreq); serv->LastPing = curtime; timeval t; gettimeofday(&t, NULL); @@ -503,7 +503,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) return; } } - else if ((Utils->PingWarnTime) && (!serv->Warned) && (curtime >= serv->NextPingTime() - (60 - Utils->PingWarnTime)) && (!serv->AnsweredLastPing())) + else if ((Utils->PingWarnTime) && (!serv->Warned) && (curtime >= serv->NextPingTime() - (Utils->PingFreq - Utils->PingWarnTime)) && (!serv->AnsweredLastPing())) { /* The server hasnt responded, send a warning to opers */ ServerInstance->SNO->WriteToSnoMask('l',"Server \002%s\002 has not responded to PING for %d seconds, high latency.", serv->GetName().c_str(), Utils->PingWarnTime); -- cgit v1.2.3