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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user