]> jfr.im git - irc/UndernetIRC/gnuworld.git/commitdiff
Small modification in the timeDiff reports. It should report the real clock time...
authorHidden <redacted>
Thu, 24 Dec 2009 20:19:14 +0000 (20:19 +0000)
committerHidden <redacted>
Thu, 24 Dec 2009 20:19:14 +0000 (20:19 +0000)
mod.ccontrol/ccontrol.cc
mod.ccontrol/ccontrol.h

index ab32aa674c9aa194c8b98fa2d189cab4dc207e20..222340d9b48788c93ea296c4c19111efeba77c3d 100644 (file)
@@ -20,7 +20,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
  * USA.
  *
- * $Id: ccontrol.cc,v 1.241 2009/09/22 09:46:36 danielaustin Exp $
+ * $Id: ccontrol.cc,v 1.242 2009/12/24 20:19:14 hidden1 Exp $
 */
 
 #define MAJORVER "1"
@@ -68,7 +68,7 @@
 #include       "ccontrol_generic.h"
 #include       "gnuworld_config.h"
 
-RCSTAG( "$Id: ccontrol.cc,v 1.241 2009/09/22 09:46:36 danielaustin Exp $" ) ;
+RCSTAG( "$Id: ccontrol.cc,v 1.242 2009/12/24 20:19:14 hidden1 Exp $" ) ;
 
 namespace gnuworld
 {
@@ -1281,7 +1281,7 @@ if(st.size() < 2)
                        return;
                        }
                int lagTime = tmpServer->getLagTime();
-               int timeDiff = abs(::time(0) - atoi(st[3]));
+               int timeDiff = abs(::time(0) - (atoi(st[3]) - atoi(st[4])));
                if ((timeDiff >= MAX_TIME_DIFF) && (lagTime < 5000) && ((::time(0) - timediffServersMap[Server]) > TIMEDIFF_REPORT_INTERVAL))
                        {
                        MsgChanLog("Time diff for %s: %ds", tmpServer->getName().c_str(), timeDiff);
index 9f1cb82bf4bc7d16a8399dede548c079a1b91bd5..a2db916c794d3588f21a42d2050c73567f7347d2 100755 (executable)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
  * USA.
  *
- * $Id: ccontrol.h,v 1.117 2009/07/29 02:05:04 hidden1 Exp $
+ * $Id: ccontrol.h,v 1.118 2009/12/24 20:19:14 hidden1 Exp $
  */
 
 #ifndef __CCONTROL_H
-#define __CCONTROL_H "$Id: ccontrol.h,v 1.117 2009/07/29 02:05:04 hidden1 Exp $"
+#define __CCONTROL_H "$Id: ccontrol.h,v 1.118 2009/12/24 20:19:14 hidden1 Exp $"
 
 //Undef this if you want to log to the database
 #define LOGTOHD
@@ -30,7 +30,7 @@
 // Minimum Interval in seconds between lag reports for those with GetLag=ON
 #define LAG_REPORT_INTERVAL 300
 // Maximum time diff tolerated for a server's clock
-#define MAX_TIME_DIFF 30
+#define MAX_TIME_DIFF 120
 // Minimum Interval in seconds between Time diff reports
 #define TIMEDIFF_REPORT_INTERVAL 43200