aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/treesocket2.cpp
diff options
context:
space:
mode:
authorGravatar w00t2008-02-22 16:40:02 +0000
committerGravatar w00t2008-02-22 16:40:02 +0000
commit29b51086b95c86f812ac35ed7d3333f060ba5a8c (patch)
tree89aa4084906075fac71ebfbafd627ae2f60732fa /src/modules/m_spanningtree/treesocket2.cpp
parentsomeone forgot to add all the new m_spanningtree files to the project too :p (diff)
downloadinspircd++-29b51086b95c86f812ac35ed7d3333f060ba5a8c.tar.gz
inspircd++-29b51086b95c86f812ac35ed7d3333f060ba5a8c.tar.bz2
inspircd++-29b51086b95c86f812ac35ed7d3333f060ba5a8c.zip
Nuke TIMESYNC from orbit \o/
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8998 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/treesocket2.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index 2fc847b0c..76920d6e6 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -160,11 +160,10 @@ bool TreeSocket::ProcessLine(std::string &line)
}
else if (command == "BURST")
{
- if (params.size() && Utils->EnableTimeSync)
+ if (params.size())
{
- bool we_have_delta = (Instance->Time(false) != Instance->Time(true));
time_t them = atoi(params[0].c_str());
- time_t delta = them - Instance->Time(false);
+ time_t delta = them - Instance->Time();
if ((delta < -600) || (delta > 600))
{
Instance->SNO->WriteToSnoMask('l',"\2ERROR\2: Your clocks are out by %d seconds (this is more than five minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2",abs(delta));
@@ -175,13 +174,6 @@ bool TreeSocket::ProcessLine(std::string &line)
{
Instance->SNO->WriteToSnoMask('l',"\2WARNING\2: Your clocks are out by %d seconds. Please consider synching your clocks.", abs(delta));
}
-
- if (!Utils->MasterTime && !we_have_delta)
- {
- this->Instance->SetTimeDelta(delta);
- // Send this new timestamp to any other servers
- Utils->DoOneToMany(Instance->Config->GetSID(), "TIMESET", params);
- }
}
this->LinkState = CONNECTED;
Link* lnk = Utils->FindLink(InboundServerName);
@@ -283,7 +275,7 @@ bool TreeSocket::ProcessLine(std::string &line)
* When there is activity on the socket, reset the ping counter so
* that we're not wasting bandwidth pinging an active server.
*/
- route_back_again->SetNextPingTime(time(NULL) + Utils->PingFreq);
+ route_back_again->SetNextPingTime(Instance->Time() + Utils->PingFreq);
route_back_again->SetPingFlag();
}
else