Forward port IPCHECK_CLONE_LIMIT, IPCHECK_CLONE_PERIOD,
[ircu2.10.12-pk.git] / ircd / IPcheck.c
index 050ea0dfa0c530ff07ac9e460bb0584368bfb00d..8e9e353201a35f869ec0d5ba5ccaf2e7b3afb033 100644 (file)
@@ -31,6 +31,7 @@
 #include "numnicks.h"       /* NumNick, NumServ (GODMODE) */
 #include "ircd_alloc.h"
 #include "ircd_events.h"
+#include "ircd_features.h"
 #include "s_debug.h"        /* Debug */
 #include "s_user.h"         /* TARGET_DELAY */
 #include "send.h"
@@ -64,9 +65,9 @@ struct IPRegistryEntry {
 #define NOW ((unsigned short)(CurrentTime & MASK_16))
 #define CONNECTED_SINCE(x) (NOW - (x))
 
-#define IPCHECK_CLONE_LIMIT 4
-#define IPCHECK_CLONE_PERIOD 40
-#define IPCHECK_CLONE_DELAY 600
+#define IPCHECK_CLONE_LIMIT feature_int(FEAT_IPCHECK_CLONE_LIMIT)
+#define IPCHECK_CLONE_PERIOD feature_int(FEAT_IPCHECK_CLONE_PERIOD)
+#define IPCHECK_CLONE_DELAY feature_int(FEAT_IPCHECK_CLONE_DELAY)
 
 
 static struct IPRegistryEntry* hashTable[IP_REGISTRY_TABLE_SIZE];
@@ -197,7 +198,7 @@ static void ip_registry_expire(struct Event* ev)
  */
 void IPcheck_init(void)
 {
-  timer_add(&expireTimer, ip_registry_expire, 0, TT_PERIODIC, 60);
+  timer_add(timer_init(&expireTimer), ip_registry_expire, 0, TT_PERIODIC, 60);
 }
 
 /*
@@ -384,7 +385,7 @@ void ip_registry_disconnect(struct Client *cptr)
   if (0 == entry) {
     /*
      * trying to find an entry for a server causes this to happen,
-     * servers should never have FLAGS_IPCHECK set
+     * servers should never have FLAG_IPCHECK set
      */
     return;
   }