summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-17 19:22:32 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-17 19:22:32 +0000
commit3699bdaee53896b491256d3aa694ef20cbdb0743 (patch)
tree618dd0abe947b290f3a5610da8c82b58bb675b10
parent813b671227cd4c9bdfb584b2ca7ad705620cd2c5 (diff)
Abort link at +/- 300secs, warn at +/- 30 secs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6689 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp10
1 files changed, 7 insertions, 3 deletions
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)
{