]> jfr.im git - solanum.git/blobdiff - ircd/newconf.c
send: add sendto_one_multiline_* API
[solanum.git] / ircd / newconf.c
index d6ae2eb20ddf00a46b0ee46adba806870c40d87c..e00d4a716c63d19aea9973af4c031e974353f263 100644 (file)
@@ -1542,6 +1542,21 @@ conf_set_general_stats_i_oper_only(void *data)
                conf_report_error("Invalid setting '%s' for general::stats_i_oper_only.", val);
 }
 
+static void
+conf_set_general_stats_l_oper_only(void *data)
+{
+       char *val = data;
+
+       if(rb_strcasecmp(val, "yes") == 0)
+               ConfigFileEntry.stats_l_oper_only = STATS_L_OPER_ONLY_YES;
+       else if(rb_strcasecmp(val, "self") == 0)
+               ConfigFileEntry.stats_l_oper_only = STATS_L_OPER_ONLY_SELF;
+       else if(rb_strcasecmp(val, "no") == 0)
+               ConfigFileEntry.stats_l_oper_only = STATS_L_OPER_ONLY_NO;
+       else
+               conf_report_error("Invalid setting '%s' for general::stats_l_oper_only.", val);
+}
+
 static void
 conf_set_general_compression_level(void *data)
 {
@@ -2313,7 +2328,7 @@ conf_report_error(const char *fmt, ...)
        }
 
        ierror("\"%s\", line %d: %s", current_file, lineno + 1, msg);
-       sendto_realops_snomask(SNO_GENERAL, L_ALL, "error: \"%s\", line %d: %s", current_file, lineno + 1, msg);
+       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "error: \"%s\", line %d: %s", current_file, lineno + 1, msg);
 }
 
 void
@@ -2333,7 +2348,7 @@ conf_report_warning(const char *fmt, ...)
        }
 
        iwarn("\"%s\", line %d: %s", current_file, lineno + 1, msg);
-       sendto_realops_snomask(SNO_GENERAL, L_ALL, "warning: \"%s\", line %d: %s", current_file, lineno + 1, msg);
+       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "warning: \"%s\", line %d: %s", current_file, lineno + 1, msg);
 }
 
 int
@@ -2651,8 +2666,9 @@ static struct ConfEntry conf_general_table[] =
        { "compression_level",  CF_INT,    conf_set_general_compression_level,  0, NULL },
        { "havent_read_conf",   CF_YESNO,  conf_set_general_havent_read_conf,   0, NULL },
        { "hide_error_messages",CF_STRING, conf_set_general_hide_error_messages,0, NULL },
-       { "stats_k_oper_only",  CF_STRING, conf_set_general_stats_k_oper_only,  0, NULL },
        { "stats_i_oper_only",  CF_STRING, conf_set_general_stats_i_oper_only,  0, NULL },
+       { "stats_k_oper_only",  CF_STRING, conf_set_general_stats_k_oper_only,  0, NULL },
+       { "stats_l_oper_only",  CF_STRING, conf_set_general_stats_l_oper_only,  0, NULL },
        { "default_umodes",     CF_QSTRING, conf_set_general_default_umodes, 0, NULL },
 
        { "default_operstring", CF_QSTRING, NULL, REALLEN,    &ConfigFileEntry.default_operstring },