diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-12 20:44:26 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-08-12 20:44:26 +0000 |
commit | 25ab84013a123de5ee05058b0b2bc37767a015c9 (patch) | |
tree | 13d1839d6152e5be79d13090396a19ecc46f6a13 /src | |
parent | 6f3fcc5f21331a4d93ff73d2ab7f374aeb17305c (diff) |
Drift now has to be >= 3 secs in either direction to trigger a warning, this is designed for warning of big drifts, we dont want it whining about ntpdate etc
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10144 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 1d8ce7625..8d3a8fc27 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -788,11 +788,12 @@ int InspIRCd::Run() */ if (TIME != OLDTIME) { - if (TIME < OLDTIME) + /* Allow a buffer of two seconds drift on this so that ntpdate etc dont harass admins */ + if (TIME < OLDTIME - 2) { SNO->WriteToSnoMask('d', "\002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %lu secs.", (unsigned long)OLDTIME-TIME); } - else if (TIME != OLDTIME + 1) + else if (TIME > OLDTIME + 2) { SNO->WriteToSnoMask('d', "\002EH?!\002 -- Time is jumping FORWARDS! Clock skipped %lu secs.", (unsigned long)TIME - OLDTIME); } |