1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 20:03:13 +02:00

Read the ns_maxemail limit as unsigned instead of int.

This commit is contained in:
Sadie Powell
2025-03-22 21:02:52 +00:00
parent 6401e328bb
commit e14a650cb9
+3 -4
View File
@@ -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;