From 25ab84013a123de5ee05058b0b2bc37767a015c9 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 12 Aug 2008 20:44:26 +0000 Subject: [PATCH] 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 --- src/inspircd.cpp | 5 +++-- 1 file 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); } -- 2.39.5