diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-07 21:44:44 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-07 21:44:44 +0000 |
commit | 5e98adde5d5da261882dfe76b18cc2af2217a875 (patch) | |
tree | 54d8cdef6b8adfd4e528c0fdb392a5738b382390 /src/modules/m_spanningtree/main.cpp | |
parent | c67ab9aa97de6072e40efa528e80ffb2a7e45280 (diff) |
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
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |