summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 17:52:36 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-15 17:52:36 +0000
commit12b60a78ff335ac40f861b00af59714ea2231825 (patch)
tree09ad50cd29487c468aa3ad8ee23816e98cb2e356
parenta5eb22efd8fd32be8c0c3c6e83b91d8ae4c0ad13 (diff)
Added nobackupokay directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1702 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf13
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 16 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 80dbe84a2..b041abdd7 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -252,6 +252,19 @@ options {
#userkey1 = 9866235
#userkey2 = 8362013
#userkey3 = 2362899
+
+ /*
+ * Allows Services to continue file write operations (i.e. database saving)
+ * even if the original file cannot be backed up. Enabling this option may
+ * allow Services to continue operation under conditions where it might
+ * otherwise fail, such as a nearly-full disk.
+ *
+ * NOTE: Enabling this option can cause irrecoverable data loss under some
+ * conditions, so make CERTAIN you know what you're doing when you enable it!
+ *
+ * This directive is optional, and you are discouraged against enabling it.
+ */
+ #nobackupokay = yes
}
/*
diff --git a/include/extern.h b/include/extern.h
index 4d998a0a9..7ff4aa9d6 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -283,7 +283,7 @@ E char *OperDBName;
E char *AutokillDBName;
E char *NewsDBName;
-E int NoBackupOkay;
+E bool NoBackupOkay;
E int StrictPasswords;
E int BadPassLimit;
E int BadPassTimeout;
diff --git a/src/config.c b/src/config.c
index 770072b96..7c72b1f7f 100644
--- a/src/config.c
+++ b/src/config.c
@@ -85,7 +85,7 @@ static char *HostSetter;
char **HostSetters;
int HostNumber = 0; /* needs to be set to 0 */
-int NoBackupOkay;
+bool NoBackupOkay;
int StrictPasswords;
int BadPassLimit;
int BadPassTimeout;
@@ -638,6 +638,7 @@ int ServerConfig::Read(bool bail)
{"options", "userkey1", "0", new ValueContainerLUInt(&UserKey1), DT_LUINTEGER, NoValidation},
{"options", "userkey2", "0", new ValueContainerLUInt(&UserKey2), DT_LUINTEGER, NoValidation},
{"options", "userkey3", "0", new ValueContainerLUInt(&UserKey3), DT_LUINTEGER, NoValidation},
+ {"options", "nobackupokay", "no", new ValueContainerBool(&NoBackupOkay), DT_BOOLEAN, 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},
@@ -1371,7 +1372,6 @@ Directive directives[] = {
{"ModuleAutoload", {{PARAM_STRING, PARAM_RELOAD, &Modules}}},
{"NewsCount", {{PARAM_POSINT, PARAM_RELOAD, &NewsCount}}},
{"NickRegDelay", {{PARAM_POSINT, PARAM_RELOAD, &NickRegDelay}}},
- {"NoBackupOkay", {{PARAM_SET, PARAM_RELOAD, &NoBackupOkay}}},
{"ReadTimeout", {{PARAM_TIME, PARAM_RELOAD, &ReadTimeout}}},
{"RemoteServer2", {{PARAM_STRING, 0, &RemoteServer2},
{PARAM_PORT, 0, &RemotePort2},