diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-22 21:02:52 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-22 21:02:52 +0000 |
commit | e14a650cb91f4f36259e75602628fde6860c8673 (patch) | |
tree | 377d6feecdddddca4c92e07bf57e2df8fd5aeaa1 /modules | |
parent | 6401e328bb4dc4ef5cafcb3fe98e4e7f8cd48de5 (diff) |
Read the ns_maxemail limit as unsigned instead of int.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/nickserv/ns_maxemail.cpp | 7 |
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; |