summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-22 21:02:52 +0000
committerSadie Powell <sadie@witchery.services>2025-03-22 21:02:52 +0000
commite14a650cb91f4f36259e75602628fde6860c8673 (patch)
tree377d6feecdddddca4c92e07bf57e2df8fd5aeaa1 /modules
parent6401e328bb4dc4ef5cafcb3fe98e4e7f8cd48de5 (diff)
Read the ns_maxemail limit as unsigned instead of int.
Diffstat (limited to 'modules')
-rw-r--r--modules/nickserv/ns_maxemail.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/nickserv/ns_maxemail.cpp b/modules/nickserv/ns_maxemail.cpp
index d923dd57c..89746c2fa 100644
--- a/modules/nickserv/ns_maxemail.cpp
+++ b/modules/nickserv/ns_maxemail.cpp
@@ -38,8 +38,7 @@ class NSMaxEmail final
bool CheckLimitReached(CommandSource &source, const Anope::string &email, bool ignoreself)
{
- int NSEmailMax = Config->GetModule(this).Get<int>("maxemails");
-
+ const auto NSEmailMax = Config->GetModule(this).Get<unsigned>("maxemails");
if (NSEmailMax < 1 || email.empty())
return false;
@@ -54,9 +53,9 @@ class NSMaxEmail final
return true;
}
- int CountEmail(const Anope::string &email, NickCore *unc)
+ unsigned CountEmail(const Anope::string &email, NickCore *unc)
{
- int count = 0;
+ unsigned count = 0;
if (email.empty())
return 0;