Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / m_create.c
index 26a4b9c9dc3c6b3968e7683df8d1b5bb7e5dd1b7..02cf2a5aa1f7a08f8739023f37515dfae47803c3 100644 (file)
  */
 #include "config.h"
 
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
@@ -140,18 +132,16 @@ int ms_create(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       MAGIC_REMOTE_JOIN_TS != chanTS)
     cli_serv(cli_user(sptr)->server)->lag = TStime() - chanTS;
 
-#if 1
-  /* If this server is >5 minutes fast, squit it */
-  if (TStime() - chanTS<-5*60*60)
-       return exit_client(sptr, sptr, &me, "Timestamp Drift/Bogus TS");
-#endif
-#if 0          
-  /* If we recieve a CREATE for a channel from a server before that server
-   * was linked, then it's a HACK
-   */
-  if (MyConnect(sptr) && chanTS<cli_timestamp(sptr)+5*60*60)
-       return exit_client(sptr,sptr,"HACK: Bogus TS on CREATE before server link");
-#endif
+  /* If this server is >1 minute fast, warn */
+  if (TStime() - chanTS<-60) {
+    static int rate;
+    sendto_opmask_butone_ratelimited(0,SNO_NETWORK,&rate,
+       "Timestamp drift from %C (%is)",sptr,chanTS-TStime());
+
+    /* If this server is >5 minutes fast, squit it */
+    if (TStime() - chanTS<-5*60*60)
+      return exit_client(sptr, sptr, &me, "Timestamp Drift/Bogus TS");
+  }
 
   /* For each channel in the comma seperated list: */
   for (name = ircd_strtok(&p, parv[1], ","); name;