Author: beware
[ircu2.10.12-pk.git] / ircd / ircd_features.c
index f0ad61081167a0d8707bb18198cbd14d87919fd2..507e811e3acc8d0e3484642a03cdda569a40011e 100644 (file)
@@ -255,6 +255,7 @@ static struct FeatureDesc {
   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),
 
   /* features that probably should not be touched */
   F_I(KILLCHASETIMELIMIT, 0, 30, 0),
@@ -381,6 +382,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 +399,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 +802,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);