summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf11
-rw-r--r--src/config.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 1adecfb4b..129dea7da 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -275,6 +275,17 @@ options {
* as well. This directive is optional, but recommended.
*/
strictpasswords = yes
+
+ /*
+ * Sets the number of invalid password tries before Services removes a user
+ * from the network. If a user enters a number of invalid passwords equal to
+ * the given amount for any Services function or combination of functions
+ * during a single IRC session (subject to badpasstimeout, below), Services
+ * will issues a /KILL for the user. If not given, Services will ignore
+ * failed password attempts (though they will be logged in any case). This
+ * directive is optional, but recommended.
+ */
+ badpasslimit = 5
}
/*
diff --git a/src/config.c b/src/config.c
index 7b0dc2045..b57ddc683 100644
--- a/src/config.c
+++ b/src/config.c
@@ -640,6 +640,7 @@ int ServerConfig::Read(bool bail)
{"options", "userkey3", "0", new ValueContainerLUInt(&UserKey3), DT_LUINTEGER, NoValidation},
{"options", "nobackupokay", "no", new ValueContainerBool(&NoBackupOkay), DT_BOOLEAN, NoValidation},
{"options", "strictpasswords", "no", new ValueContainerBool(&StrictPasswords), DT_BOOLEAN, NoValidation},
+ {"options", "badpasslimit", "0", new ValueContainerInt(&BadPassLimit), 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},
@@ -1351,7 +1352,6 @@ bool ValueItem::GetBool()
/*************************************************************************/
Directive directives[] = {
- {"BadPassLimit", {{PARAM_POSINT, PARAM_RELOAD, &BadPassLimit}}},
{"BadPassTimeout", {{PARAM_TIME, PARAM_RELOAD, &BadPassTimeout}}},
{"DumpCore", {{PARAM_SET, 0, &DumpCore}}},
{"ExpireTimeout", {{PARAM_TIME, PARAM_RELOAD, &ExpireTimeout}}},