summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 1a2275e37..947cbd95a 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -295,6 +295,12 @@ options {
* disconnects. This directive is optional.
*/
badpasstimeout = 1h
+
+ /*
+ * Sets the delay between automatic database updates. This time is reset by
+ * the OperServ UPDATE command.
+ */
+ updatetimeout = 5m
}
/*
diff --git a/include/extern.h b/include/extern.h
index f794be649..4505ca1cb 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -287,7 +287,7 @@ E bool NoBackupOkay;
E bool StrictPasswords;
E int BadPassLimit;
E time_t BadPassTimeout;
-E int UpdateTimeout;
+E time_t UpdateTimeout;
E int ExpireTimeout;
E int ReadTimeout;
E int WarningTimeout;
diff --git a/src/config.c b/src/config.c
index 7f1641e95..eeb9f96d3 100644
--- a/src/config.c
+++ b/src/config.c
@@ -89,7 +89,7 @@ bool NoBackupOkay;
bool StrictPasswords;
int BadPassLimit;
time_t BadPassTimeout;
-int UpdateTimeout;
+time_t UpdateTimeout;
int ExpireTimeout;
int ReadTimeout;
int WarningTimeout;
@@ -642,6 +642,7 @@ int ServerConfig::Read(bool bail)
{"options", "strictpasswords", "no", new ValueContainerBool(&StrictPasswords), DT_BOOLEAN, NoValidation},
{"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},
{"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},
@@ -1388,7 +1389,6 @@ Directive directives[] = {
{{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleMessage}}},
{"GlobalOnCycleUP", {{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleUP}}},
{"TimeoutCheck", {{PARAM_TIME, PARAM_RELOAD, &TimeoutCheck}}},
- {"UpdateTimeout", {{PARAM_TIME, PARAM_RELOAD, &UpdateTimeout}}},
{"UsePrivmsg", {{PARAM_SET, PARAM_RELOAD, &UsePrivmsg}}},
{"UseStrictPrivMsg", {{PARAM_SET, PARAM_RELOAD, &UseStrictPrivMsg}}},
{"UseSVSHOLD", {{PARAM_SET, PARAM_RELOAD, &UseSVSHOLD}}},
@@ -1701,7 +1701,6 @@ int read_config(int reload)
}
}
- CHECK(UpdateTimeout);
CHECK(ExpireTimeout);
CHECK(ReadTimeout);
CHECK(WarningTimeout);