diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-08 11:22:14 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-08 11:22:14 +0000 |
commit | 8ab23609afd280d7a3bf20ca674cb4204afec149 (patch) | |
tree | 2790a0e17b288574ababf1a389a8d33e1cdd2369 | |
parent | 320fd85ef9b022af6002fc831e7cab65b5b23bac (diff) |
Checks for timestamps, boot server off and abort if time delay > 10 mins (the safe value used by inspircd)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3544 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index d164bef27..b5584b532 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1365,7 +1365,7 @@ class TreeSocket : public InspSocket * back to the core so that a large burst is split into at least 6 sections * (possibly more) */ - std::string burst = "BURST"; + std::string burst = "BURST "+ConvToStr(TIME); std::string endburst = "ENDBURST"; Srv->SendOpers("*** Bursting to \2"+s->GetName()+"\2."); this->WriteLine(burst); @@ -2264,6 +2264,14 @@ class TreeSocket : public InspSocket } else if (command == "BURST") { + time_t THEM = atoi(params[0].c_str()); + long delta = THEM-TIME; + if ((delta < -600) || (delta > 600)) + { + WriteOpers("*** \2ERROR\2: Your clocks are out by "+ConvToStr(abs(delta))+" seconds (this is more than ten minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2"); + this->WriteLine("ERROR :Your clocks are out by "+ConvToStr(abs(delta))+" seconds (this is more than ten minutes). Link aborted, PLEASE SYNC YOUR CLOCKS!"); + return false; + } this->LinkState = CONNECTED; Node = new TreeServer(InboundServerName,InboundDescription,TreeRoot,this); TreeRoot->AddChild(Node); |