Forward port SOCKSENDBUF, SOCKRECVBUF features from 2.10.11.
[ircu2.10.12-pk.git] / ircd / ircd_features.c
index f0ad61081167a0d8707bb18198cbd14d87919fd2..1ccef6891d216423ec8f949d8d6f9bd83de75262 100644 (file)
@@ -253,12 +253,15 @@ static struct FeatureDesc {
   F_B(HOST_HIDING, 0, 1, 0),
   F_S(HIDDEN_HOST, FEAT_CASE, "users.undernet.org", 0),
   F_S(HIDDEN_IP, 0, "127.0.0.1", 0),
-  F_B(AUTOHIDE, 0, 1, 0),
   F_B(CONNEXIT_NOTICES, 0, 0, 0),
+  F_B(OPLEVELS, 0, 1, 0),
+  F_B(LOCAL_CHANNELS, 0, 1, 0),
+  F_B(TOPIC_BURST, 0, 0, 0),
 
   /* features that probably should not be touched */
   F_I(KILLCHASETIMELIMIT, 0, 30, 0),
   F_I(MAXCHANNELSPERUSER, 0, 10, 0),
+  F_I(NICKLEN, 0, 9, 0),
   F_I(AVBANLEN, 0, 40, 0),
   F_I(MAXBANS, 0, 45, 0),
   F_I(MAXSILES, 0, 15, 0),
@@ -271,6 +274,11 @@ static struct FeatureDesc {
   F_I(CONNECTFREQUENCY, 0, 600, init_class),
   F_I(DEFAULTMAXSENDQLENGTH, 0, 40000, init_class),
   F_I(GLINEMAXUSERCOUNT, 0, 20, 0),
+  F_I(SOCKSENDBUF, 0, 0, 0),
+  F_I(SOCKRECVBUF, 0, 0, 0),
+  F_I(IPCHECK_CLONE_LIMIT, 0, 4, 0),
+  F_I(IPCHECK_CLONE_PERIOD, 0, 40, 0),
+  F_I(IPCHECK_CLONE_DELAY, 0, 600, 0),
 
   /* Some misc. default paths */
   F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init),
@@ -282,6 +290,9 @@ static struct FeatureDesc {
   F_I(TOS_SERVER, 0, 0x08, 0),
   F_I(TOS_CLIENT, 0, 0x08, 0),
   F_I(POLLS_PER_LOOP, 0, 200, 0),
+  F_I(IRCD_RES_RETRIES, 0, 2, 0),
+  F_I(IRCD_RES_TIMEOUT, 0, 4, 0),
+  F_I(AUTH_TIMEOUT, 0, 9, 0),
 
   /* features that affect all operators */
   F_B(CRYPT_OPER_PASSWORD, FEAT_MYOPER | FEAT_READ, 1, 0),
@@ -353,6 +364,7 @@ static struct FeatureDesc {
   F_B(HIS_STATS_o, 0, 1, 0),
   F_B(HIS_STATS_p, 0, 1, 0),
   F_B(HIS_STATS_q, 0, 1, 0),
+  F_B(HIS_STATS_R, 0, 1, 0),
   F_B(HIS_STATS_r, 0, 1, 0),
   F_B(HIS_STATS_d, 0, 1, 0),
   F_B(HIS_STATS_e, 0, 1, 0),
@@ -381,6 +393,7 @@ static struct FeatureDesc {
   /* Misc. random stuff */
   F_S(NETWORK, 0, "UnderNet", 0),
   F_S(URL_CLIENTS, 0, "ftp://ftp.undernet.org/pub/irc/clients", 0),
+
 #undef F_S
 #undef F_B
 #undef F_I
@@ -397,7 +410,7 @@ feature_desc(struct Client* from, const char *feature)
   assert(0 != feature);
 
   for (i = 0; features[i].type; i++) /* find appropriate descriptor */
-    if (!ircd_strcmp(feature, features[i].type))
+    if (!strcmp(feature, features[i].type))
       return &features[i];
 
   Debug((DEBUG_ERROR, "Unknown feature \"%s\"", feature));
@@ -800,6 +813,9 @@ feature_int(enum Feature feat)
 int
 feature_bool(enum Feature feat)
 {
+  assert(feat <= FEAT_LAST_F);
+  if (FEAT_LAST_F < feat)
+    return 0;
   assert(features[feat].feat == feat);
   assert((features[feat].flags & FEAT_MASK) == FEAT_BOOL);