summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 20:39:02 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 20:39:02 +0000
commitc30ec33695a71f7a9bde83d32b43a1a93c6315ad (patch)
treef6a1c8af2fe197fbe1e599f8ce78718ad593cf39
parentf3bb3064d248eb87bcfa92c062941b774ecdad43 (diff)
Added keepbackups directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1720 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf12
-rw-r--r--src/config.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 5993ca3d6..1bbe22165 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -343,7 +343,7 @@ options {
timeoutcheck = 3s
/*
- * Set the number of days log files are kept. If you don't give it, or if you
+ * Sets the number of days log files are kept. If you don't give it, or if you
* set it to 0, logs will be kept indefinitely.
*
* NOTE: Services must run 24 hours a day for this feature to work.
@@ -351,6 +351,16 @@ options {
* This directive is optional, but recommended.
*/
keeplogs = 7
+
+ /*
+ * Sets the number of days backups of databases are kept. If you don't give it,
+ * or if you set it to 0, Services won't backup the databases.
+ *
+ * NOTE: Services must run 24 hours a day for this feature to work.
+ *
+ * This directive is optional, but recommended.
+ */
+ keepbackups = 3
}
/*
diff --git a/src/config.c b/src/config.c
index 5f703ade6..cea517705 100644
--- a/src/config.c
+++ b/src/config.c
@@ -648,6 +648,7 @@ int ServerConfig::Read(bool bail)
{"options", "warningtimeout", "0", new ValueContainerTime(&WarningTimeout), DT_TIME, ValidateNotZero},
{"options", "timeoutcheck", "0", new ValueContainerTime(&TimeoutCheck), DT_TIME, NoValidation},
{"options", "keeplogs", "0", new ValueContainerInt(&KeepLogs), DT_INTEGER, NoValidation},
+ {"options", "keepbackups", "0", new ValueContainerInt(&KeepBackups), DT_INTEGER, NoValidation},
{"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},
@@ -1361,7 +1362,6 @@ bool ValueItem::GetBool()
Directive directives[] = {
{"DumpCore", {{PARAM_SET, 0, &DumpCore}}},
{"ForceForbidReason", {{PARAM_SET, PARAM_RELOAD, &ForceForbidReason}}},
- {"KeepBackups", {{PARAM_INT, PARAM_RELOAD, &KeepBackups}}},
{"LocalAddress", {{PARAM_STRING, 0, &LocalHost},
{PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}},
{"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}},