]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Add the config handling code for expire_override_time config option.
authorJD Horelick <redacted>
Thu, 25 Feb 2010 01:28:17 +0000 (20:28 -0500)
committerJD Horelick <redacted>
Thu, 25 Feb 2010 01:28:17 +0000 (20:28 -0500)
Part one of override stuff. This is gonna be painful.

doc/example.conf
doc/reference.conf
include/s_conf.h
modules/m_info.c
src/newconf.c
src/s_conf.c

index ead3b0f7ccb35d27ec253dcedf1e527b38475383..08ae57b6139db5d603fb10a75092e2a17a4eaeac 100755 (executable)
@@ -510,6 +510,7 @@ general {
        reject_duration = 5 minutes;
        throttle_duration = 60;
        throttle_count = 4;
+       expire_override_time = 5 minutes;
 };
 
 modules {
index 672946d7477bea63620d9eefac2c2d36c3196563..96057d7861bf4e4010eff82cbd21d5b9141c26ba 100755 (executable)
@@ -1260,6 +1260,12 @@ general {
        /* throttle_count: Number of connections within throttle_duration that it takes
         * for throttling to take effect */
        throttle_count = 4;
+
+       /* expire_override_time: User mode +p (override) will be automatically unset
+        * this long after it is set. 0 disables this (not recommended). Default is
+        * 5 minutes.
+        */
+       expire_override_time = 5 minutes;
 };
 
 modules {
index 625bfde7b735496bfe9273e171e97ca3561cf970..2a95669313e2251fc8a62f73dfab35c4584174f2 100644 (file)
@@ -217,6 +217,7 @@ struct config_file_entry
        int global_snotices;
        int operspy_dont_care_user_info;
        int secret_channels_in_whois;
+       int expire_override_time;
 };
 
 struct config_channel_entry
index 746ae418cc7d5a7ba31d2201f63cfb37fef11203..18f7b58e4cc850f580f7e8b2b025e46eb67fe3f5 100644 (file)
@@ -175,6 +175,12 @@ static struct InfoStruct info_table[] = {
                &ConfigFileEntry.dots_in_ident,
                "Number of permissable dots in an ident"
        },
+       {
+               "expire_override_time",
+               OUTPUT_DECIMAL,
+               &ConfigFileEntry.expire_override_time,
+               "Period of time after which to unset user mode +p"
+       },
        {
                "failed_oper_notice",
                OUTPUT_BOOLEAN,
index 168de2d48ff338931060bfee154235d3ade4702a..50ceefc02a37f97348beaa4d9f019ca7ee5a838a 100644 (file)
@@ -2199,6 +2199,7 @@ static struct ConfEntry conf_general_table[] =
        { "ts_warn_delta",      CF_TIME,  NULL, 0, &ConfigFileEntry.ts_warn_delta       },
        { "use_whois_actually", CF_YESNO, NULL, 0, &ConfigFileEntry.use_whois_actually  },
        { "warn_no_nline",      CF_YESNO, NULL, 0, &ConfigFileEntry.warn_no_nline       },
+       { "expire_override_time", CF_TIME, NULL, 0, &ConfigFileEntry.expire_override_time       },
        { "\0",                 0,        NULL, 0, NULL }
 };
 
index dcdd30dd422b01f7737b28756fd34f684f4dbca8..22ba9e7da1ed8c378bb531cbec186dafddb63dd0 100644 (file)
@@ -783,6 +783,7 @@ set_default_conf(void)
        ConfigFileEntry.reject_duration = 120;
        ConfigFileEntry.throttle_count = 4;
        ConfigFileEntry.throttle_duration = 60;
+       ConfigFileEntry.expire_override_time = 300;
 
        ServerInfo.default_max_clients = MAXCONNECTIONS;