summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-05-06 16:42:13 +0100
committerSadie Powell <sadie@witchery.services>2024-05-06 16:42:13 +0100
commit23db58a303c6178c24e3e067caceff57d8b7e2bc (patch)
tree06dd0697e4fd5de12989b5bf0db252c87a626f0c /src
parentee69dc3105b74936a16745ef83cbba7139ea1ca1 (diff)
Change badpasslimit from int to unsigned int.
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp
index c0e516df9..8273e888d 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -825,14 +825,14 @@ Anope::string User::Mask() const
bool User::BadPassword()
{
- if (!Config->GetBlock("options")->Get<int>("badpasslimit"))
+ if (!Config->GetBlock("options")->Get<unsigned int>("badpasslimit"))
return false;
if (Config->GetBlock("options")->Get<time_t>("badpasstimeout") > 0 && this->invalid_pw_time > 0 && this->invalid_pw_time < Anope::CurTime - Config->GetBlock("options")->Get<time_t>("badpasstimeout"))
this->invalid_pw_count = 0;
++this->invalid_pw_count;
this->invalid_pw_time = Anope::CurTime;
- if (this->invalid_pw_count >= Config->GetBlock("options")->Get<int>("badpasslimit"))
+ if (this->invalid_pw_count >= Config->GetBlock("options")->Get<unsigned int>("badpasslimit"))
{
this->Kill(Me, "Too many invalid passwords");
return true;