1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 10:43:13 +02:00

Allow userless command sources

This commit is contained in:
Adam
2012-06-18 05:04:30 -04:00
parent 873d4287de
commit 2dec8e767a
153 changed files with 1029 additions and 1060 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ class NSMaxEmail : public Module
if (this->NSEmailMax < 1 || email.empty())
return false;
if (this->CountEmail(email, source.u) < this->NSEmailMax)
if (this->CountEmail(email, source.nc) < this->NSEmailMax)
return false;
if (this->NSEmailMax == 1)
@@ -35,7 +35,7 @@ class NSMaxEmail : public Module
return true;
}
int CountEmail(const Anope::string &email, User *u)
int CountEmail(const Anope::string &email, NickCore *unc)
{
int count = 0;
@@ -46,7 +46,7 @@ class NSMaxEmail : public Module
{
const NickCore *nc = it->second;
if (!(u->Account() && u->Account() == nc) && !nc->email.empty() && nc->email.equals_ci(email))
if (unc != nc && !nc->email.empty() && nc->email.equals_ci(email))
++count;
}