summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf28
-rw-r--r--src/config.c6
2 files changed, 30 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index df914b406..db174af73 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -212,6 +212,34 @@ networkinfo {
}
/*
+ * [REQUIRED] Services Options
+ *
+ * This section contains various options which determine how Services will operate.
+ */
+options {
+ /*
+ * The encryption module to use when dealing with passwords. This determines how
+ * the passwords are stored in the databases, and does not add any security as
+ * far as transmitting passwords over the network goes.
+ *
+ * When using enc_none, passwords will be stored without encryption in plain
+ * text, allowing for passwords to be recovered later. The other encryption modules
+ * use one-way encryption, so the passwords can not be recovered later if those
+ * are used.
+ *
+ * NOTE: enc_old is Anope's previous (broken) MD5 implementation, if your databases
+ * were made using that module, continue to use it and do not use enc_md5.
+ *
+ * Supported:
+ * - enc_none (plain text, no encryption)
+ * - enc_old (old, broken MD5 encryption)
+ * - enc_md5 (working MD5 encryption)
+ * - enc_sha1 (SHA1 encryption)
+ */
+ encryption = "enc_none"
+}
+
+/*
* [OPTIONAL] Mail Config
*
* This section contains settings related to the use of e-mail from Services.
diff --git a/src/config.c b/src/config.c
index f9144b663..c477862d9 100644
--- a/src/config.c
+++ b/src/config.c
@@ -566,7 +566,7 @@ int ServerConfig::Read(bool bail)
{
errstr.clear();
// These tags MUST occur and must ONLY occur once in the config file
- static const char *Once[] = {"serverinfo", "networkinfo", "nickserv", "chanserv", "memoserv", "helpserv", "operserv", NULL};
+ static const char *Once[] = {"serverinfo", "networkinfo", "options", "nickserv", "chanserv", "memoserv", "helpserv", "operserv", NULL};
// These tags can occur ONCE or not at all
InitialConfig Values[] = {
/* The following comments are from CyberBotX to w00t as examples to use:
@@ -634,6 +634,7 @@ int ServerConfig::Read(bool bail)
{"networkinfo", "logbot", "no", new ValueContainerBool(&LogBot), DT_BOOLEAN, NoValidation},
{"networkinfo", "networkname", "", new ValueContainerChar(&NetworkName), DT_CHARPTR, ValidateNotEmpty},
{"networkinfo", "nicklen", "0", new ValueContainerInt(&NickLen), DT_INTEGER | DT_NORELOAD, ValidateNickLen},
+ {"options", "encryption", "", new ValueContainerChar(&EncModule), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"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},
@@ -1342,7 +1343,6 @@ Directive directives[] = {
{"BadPassLimit", {{PARAM_POSINT, PARAM_RELOAD, &BadPassLimit}}},
{"BadPassTimeout", {{PARAM_TIME, PARAM_RELOAD, &BadPassTimeout}}},
{"DumpCore", {{PARAM_SET, 0, &DumpCore}}},
- {"EncModule", {{PARAM_STRING, 0, &EncModule}}},
{"ExpireTimeout", {{PARAM_TIME, PARAM_RELOAD, &ExpireTimeout}}},
{"ForceForbidReason", {{PARAM_SET, PARAM_RELOAD, &ForceForbidReason}}},
{"KeepBackups", {{PARAM_INT, PARAM_RELOAD, &KeepBackups}}},
@@ -1695,8 +1695,6 @@ int read_config(int reload)
}
}
- CHECK(EncModule);
-
CHECK(UpdateTimeout);
CHECK(ExpireTimeout);
CHECK(ReadTimeout);