summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf6
-rw-r--r--src/config.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 62f4c89ca..bac2a087e 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -436,6 +436,12 @@ options {
* message/notice. This directive is optional.
*/
#anonymousglobal = yes
+
+ /*
+ * Prevents users from registering their nick if they are not connected
+ * for at least the given number of seconds. This directive is optional.
+ */
+ #nickregdelay = 30
}
/*
diff --git a/src/config.c b/src/config.c
index 66d307c28..d611084e8 100644
--- a/src/config.c
+++ b/src/config.c
@@ -670,6 +670,7 @@ int ServerConfig::Read(bool bail)
{"options", "globaloncycledown", "", new ValueContainerChar(&GlobalOnCycleMessage), DT_CHARPTR, ValidateGlobalOnCycle},
{"options", "globaloncycleup", "", new ValueContainerChar(&GlobalOnCycleUP), DT_CHARPTR, ValidateGlobalOnCycle},
{"options", "anonymousglobal", "no", new ValueContainerBool(&AnonymousGlobal), DT_BOOLEAN, NoValidation},
+ {"options", "nickregdelay", "0", new ValueContainerInt(&NickRegDelay), 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},
@@ -1394,7 +1395,6 @@ Directive directives[] = {
{"MysqlRetryGap", {{PARAM_POSINT, PARAM_RELOAD, &MysqlRetryGap}}},
{"ModuleAutoload", {{PARAM_STRING, PARAM_RELOAD, &Modules}}},
{"NewsCount", {{PARAM_POSINT, PARAM_RELOAD, &NewsCount}}},
- {"NickRegDelay", {{PARAM_POSINT, PARAM_RELOAD, &NickRegDelay}}},
{"RemoteServer2", {{PARAM_STRING, 0, &RemoteServer2},
{PARAM_PORT, 0, &RemotePort2},
{PARAM_STRING, 0, &RemotePassword2}}},