diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 17:52:45 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 17:52:45 +0000 |
commit | 55e9bf5aea7787127d39aa8958fd203dfe4b67ed (patch) | |
tree | 4022110a85c9db5a61a590b6f4560dcac0ca96ae | |
parent | 12b60a78ff335ac40f861b00af59714ea2231825 (diff) |
Added strictpasswords directive to options block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1703 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | data/example_new.conf | 10 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index b041abdd7..1adecfb4b 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -265,6 +265,16 @@ options { * This directive is optional, and you are discouraged against enabling it. */ #nobackupokay = yes + + /* + * If set, Services will perform more stringent checks on passwords. If this + * isn't set, Services will only disallow a password if it is the same as the + * entity (nickname or channel name) with which it is associated. When set, + * however, Services will also check that the password is at least five + * characters long, and in the future will probably check other things + * as well. This directive is optional, but recommended. + */ + strictpasswords = yes } /* diff --git a/include/extern.h b/include/extern.h index 7ff4aa9d6..e9708fbcb 100644 --- a/include/extern.h +++ b/include/extern.h @@ -284,7 +284,7 @@ E char *AutokillDBName; E char *NewsDBName; E bool NoBackupOkay; -E int StrictPasswords; +E bool StrictPasswords; E int BadPassLimit; E int BadPassTimeout; E int UpdateTimeout; diff --git a/src/config.c b/src/config.c index 7c72b1f7f..7b0dc2045 100644 --- a/src/config.c +++ b/src/config.c @@ -86,7 +86,7 @@ char **HostSetters; int HostNumber = 0; /* needs to be set to 0 */ bool NoBackupOkay; -int StrictPasswords; +bool StrictPasswords; int BadPassLimit; int BadPassTimeout; int UpdateTimeout; @@ -639,6 +639,7 @@ int ServerConfig::Read(bool bail) {"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}, + {"options", "strictpasswords", "no", new ValueContainerBool(&StrictPasswords), 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}, @@ -1386,7 +1387,6 @@ Directive directives[] = { {"GlobalOnCycleMessage", {{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleMessage}}}, {"GlobalOnCycleUP", {{PARAM_STRING, PARAM_RELOAD, &GlobalOnCycleUP}}}, - {"StrictPasswords", {{PARAM_SET, PARAM_RELOAD, &StrictPasswords}}}, {"TimeoutCheck", {{PARAM_TIME, PARAM_RELOAD, &TimeoutCheck}}}, {"UpdateTimeout", {{PARAM_TIME, PARAM_RELOAD, &UpdateTimeout}}}, {"UsePrivmsg", {{PARAM_SET, PARAM_RELOAD, &UsePrivmsg}}}, |