summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/anope.example.conf12
-rw-r--r--docs/Changes.conf1
-rw-r--r--include/language.h6
-rw-r--r--modules/commands/ns_register.cpp2
-rw-r--r--modules/commands/ns_set.cpp4
5 files changed, 7 insertions, 18 deletions
diff --git a/data/anope.example.conf b/data/anope.example.conf
index 8c641001f..88ac0a948 100644
--- a/data/anope.example.conf
+++ b/data/anope.example.conf
@@ -403,18 +403,6 @@ options
#seed = 9866235
/*
- * 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 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
-
- /*
* 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
diff --git a/docs/Changes.conf b/docs/Changes.conf
index 9f9802834..4f0077413 100644
--- a/docs/Changes.conf
+++ b/docs/Changes.conf
@@ -1,6 +1,7 @@
Anope Version 2.1.0-git
--------------------
Added nickserv:minpasslen for configuring the minimum password length.
+Removed nickserv:strictpasswords as it is obsolete now nickserv:minpasslen exists.
Renamed nickserv:passlen to nickserv:maxpasslen.
Anope Version 2.0.10-git
diff --git a/include/language.h b/include/language.h
index 3087da802..0b55c7f22 100644
--- a/include/language.h
+++ b/include/language.h
@@ -70,9 +70,9 @@ namespace Language
#define READ_ONLY_MODE _("Services are in read-only mode!")
#define PASSWORD_INCORRECT _("Password incorrect.")
#define ACCESS_DENIED _("Access denied.")
-#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should be at least\n" \
- "five characters long, should not be something easily guessed\n" \
- "(e.g. your real name or your nick), and cannot contain the space or tab characters.")
+#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should not be\n" \
+ "something that could be easily guessed (e.g. your real name or your nick) and\n" \
+ "cannot contain the space or tab characters.\n")
#define PASSWORD_TOO_SHORT _("Your password is too short. It must must be longer than %u characters.")
#define PASSWORD_TOO_LONG _("Your password is too long. It must be shorter than %u characters.")
#define NICK_NOT_REGISTERED _("Your nick isn't registered.")
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index bdbff9386..01b8e086b 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -201,7 +201,7 @@ class CommandNSRegister : public Command
source.Reply(_("Please wait %d seconds before using the REGISTER command again."), (u->lastnickreg + reg_delay) - Anope::CurTime);
else if (NickAlias::Find(u_nick) != NULL)
source.Reply(NICK_ALREADY_REGISTERED, u_nick.c_str());
- else if (pass.equals_ci(u_nick) || (Config->GetBlock("options")->Get<bool>("strictpasswords") && pass.length() < 5))
+ else if (pass.equals_ci(u_nick))
source.Reply(MORE_OBSCURE_PASSWORD);
else if (pass.length() < minpasslen)
source.Reply(PASSWORD_TOO_SHORT, minpasslen);
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index 8008bd5d4..e4d6f1838 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -131,7 +131,7 @@ class CommandNSSetPassword : public Command
return;
}
- if (source.GetNick().equals_ci(param) || (Config->GetBlock("options")->Get<bool>("strictpasswords") && len < 5))
+ if (source.GetNick().equals_ci(param))
{
source.Reply(MORE_OBSCURE_PASSWORD);
return;
@@ -200,7 +200,7 @@ class CommandNSSASetPassword : public Command
return;
}
- if (nc->display.equals_ci(params[1]) || (Config->GetBlock("options")->Get<bool>("strictpasswords") && len < 5))
+ if (nc->display.equals_ci(params[1]))
{
source.Reply(MORE_OBSCURE_PASSWORD);
return;