diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 19:13:44 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 19:13:44 +0000 |
commit | 5fa7475f65cdf761233f463aae337b5b81dabf16 (patch) | |
tree | 83c29a656d088f63dede29184906c89fbf00e4d0 | |
parent | ec8fd88965d710cd7c75729e1e95931596997bc7 (diff) |
Added updatetimeout directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1711 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | data/example_new.conf | 6 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 5 |
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); |