From 29b51086b95c86f812ac35ed7d3333f060ba5a8c Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 22 Feb 2008 16:40:02 +0000 Subject: Nuke TIMESYNC from orbit \o/ git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8998 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/modules/m_spanningtree/treesocket2.cpp') 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 -- cgit v1.3.1-10-gc9f91