summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/ns_register.cpp6
-rw-r--r--modules/commands/ns_set.cpp12
2 files changed, 9 insertions, 9 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index 6fd66a33f..bf59ad1d0 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -192,7 +192,7 @@ class CommandNSRegister : public Command
}
}
- unsigned int passlen = Config->GetModule("nickserv")->Get<unsigned>("passlen", "32");
+ unsigned int maxpasslen = Config->GetModule("nickserv")->Get<unsigned>("maxpasslen", "32");
if (Config->GetModule("nickserv")->Get<bool>("forceemail", "yes") && email.empty())
this->OnSyntaxError(source, "");
@@ -202,8 +202,8 @@ class CommandNSRegister : public Command
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))
source.Reply(MORE_OBSCURE_PASSWORD);
- else if (pass.length() > passlen)
- source.Reply(PASSWORD_TOO_LONG, passlen);
+ else if (pass.length() > maxpasslen)
+ source.Reply(PASSWORD_TOO_LONG, maxpasslen);
else if (!email.empty() && !Mail::Validate(email))
source.Reply(MAIL_X_INVALID, email.c_str());
else
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index eefca82f6..22f74703c 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -137,10 +137,10 @@ class CommandNSSetPassword : public Command
return;
}
- unsigned int passlen = Config->GetModule("nickserv")->Get<unsigned>("passlen", "32");
- if (len > passlen)
+ unsigned int maxpasslen = Config->GetModule("nickserv")->Get<unsigned>("maxpasslen", "32");
+ if (len > maxpasslen)
{
- source.Reply(PASSWORD_TOO_LONG, passlen);
+ source.Reply(PASSWORD_TOO_LONG, maxpasslen);
return;
}
@@ -199,10 +199,10 @@ class CommandNSSASetPassword : public Command
return;
}
- unsigned int passlen = Config->GetModule("nickserv")->Get<unsigned>("passlen", "32");
- if (len > passlen)
+ unsigned int maxpasslen = Config->GetModule("nickserv")->Get<unsigned>("maxpasslen", "32");
+ if (len > maxpasslen)
{
- source.Reply(PASSWORD_TOO_LONG, passlen);
+ source.Reply(PASSWORD_TOO_LONG, maxpasslen);
return;
}