From 9502567453cccfe6193cb0def511e11078bb4463 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 22 Feb 2024 11:01:41 +0000 Subject: Fix the NickServ help message showing a wrong min password length. Closes #357. --- modules/nickserv/ns_register.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/nickserv/ns_register.cpp b/modules/nickserv/ns_register.cpp index 8e888994a..5ee5fccb2 100644 --- a/modules/nickserv/ns_register.cpp +++ b/modules/nickserv/ns_register.cpp @@ -271,6 +271,7 @@ public: bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { + unsigned int minpasslen = Config->GetModule("nickserv")->Get("minpasslen", "10"); this->SendSyntax(source); source.Reply(" "); source.Reply(_("Registers your nickname in the %s database. Once\n" @@ -288,9 +289,10 @@ public: "your nickname as a password is a much worse idea ;) and,\n" "in fact, %s will not allow it. Also, short\n" "passwords are vulnerable to trial-and-error searches, so\n" - "you should choose a password at least 5 characters long.\n" + "you should choose a password at least %u characters long.\n" "Finally, the space character cannot be used in passwords."), - source.service->nick.c_str(), source.service->nick.c_str()); + source.service->nick.c_str(), source.service->nick.c_str(), + minpasslen); if (!Config->GetModule("nickserv")->Get("forceemail", "yes")) { -- cgit