diff options
-rw-r--r-- | data/example_new.conf | 7 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index 947cbd95a..03c6fb0d0 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -301,6 +301,13 @@ options { * the OperServ UPDATE command. */ updatetimeout = 5m + + /* + * Sets the delay between checks for expired nicknames and channels. The + * OperServ UPDATE command will also cause a check for expiration and reset + * this timer. + */ + expiretimeout = 30m } /* diff --git a/include/extern.h b/include/extern.h index 4505ca1cb..0d558ec7b 100644 --- a/include/extern.h +++ b/include/extern.h @@ -288,7 +288,7 @@ E bool StrictPasswords; E int BadPassLimit; E time_t BadPassTimeout; E time_t UpdateTimeout; -E int ExpireTimeout; +E time_t ExpireTimeout; E int ReadTimeout; E int WarningTimeout; E int TimeoutCheck; diff --git a/src/config.c b/src/config.c index eeb9f96d3..c1b9ff204 100644 --- a/src/config.c +++ b/src/config.c @@ -90,7 +90,7 @@ bool StrictPasswords; int BadPassLimit; time_t BadPassTimeout; time_t UpdateTimeout; -int ExpireTimeout; +time_t ExpireTimeout; int ReadTimeout; int WarningTimeout; int TimeoutCheck; @@ -643,6 +643,7 @@ int ServerConfig::Read(bool bail) {"options", "badpasslimit", "0", new ValueContainerInt(&BadPassLimit), DT_INTEGER, NoValidation}, {"options", "badpasstimeout", "0", new ValueContainerTime(&BadPassTimeout), DT_TIME, NoValidation}, {"options", "updatetimeout", "0", new ValueContainerTime(&UpdateTimeout), DT_TIME, ValidateNotZero}, + {"options", "expiretimeout", "0", new ValueContainerTime(&ExpireTimeout), DT_TIME, ValidateNotZero}, {"nickserv", "nick", "NickServ", new ValueContainerChar(&s_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"nickserv", "description", "Nickname Registration Service", new ValueContainerChar(&desc_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"nickserv", "database", "nick.db", new ValueContainerChar(&NickDBName), DT_CHARPTR, ValidateNotEmpty}, @@ -1355,7 +1356,6 @@ bool ValueItem::GetBool() Directive directives[] = { {"DumpCore", {{PARAM_SET, 0, &DumpCore}}}, - {"ExpireTimeout", {{PARAM_TIME, PARAM_RELOAD, &ExpireTimeout}}}, {"ForceForbidReason", {{PARAM_SET, PARAM_RELOAD, &ForceForbidReason}}}, {"KeepBackups", {{PARAM_INT, PARAM_RELOAD, &KeepBackups}}}, {"KeepLogs", {{PARAM_INT, PARAM_RELOAD, &KeepLogs}}}, @@ -1701,7 +1701,6 @@ int read_config(int reload) } } - CHECK(ExpireTimeout); CHECK(ReadTimeout); CHECK(WarningTimeout); CHECK(TimeoutCheck); |