From 3699bdaee53896b491256d3aa694ef20cbdb0743 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 17 Mar 2007 19:22:32 +0000 Subject: Abort link at +/- 300secs, warn at +/- 30 secs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6689 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 128f4613e..e4d53c8ef 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -994,12 +994,16 @@ bool TreeSocket::ProcessLine(std::string &line) 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); - if ((delta < -600) || (delta > 600)) + if ((delta < -300) || (delta > 300)) { - this->Instance->SNO->WriteToSnoMask('l',"\2ERROR\2: Your clocks are out by %d seconds (this is more than ten minutes). Link aborted, \2PLEASE SYNC YOUR CLOCKS!\2",abs(delta)); - this->WriteLine("ERROR :Your clocks are out by "+ConvToStr(abs(delta))+" seconds (this is more than ten minutes). Link aborted, PLEASE SYNC YOUR CLOCKS!"); + 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)); + 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; } + else if ((delta < -30) || (delta > 30)) + { + 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) { -- cgit v1.2.3