mirror of
https://github.com/anope/anope.git
synced 2026-07-02 18:33:12 +02:00
Fix using User::Account where User::IsIdentified should be used.
The former causes a dereference which cause a database update. This is not good for performance with db_sql_live on bigger networks.
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ void MemoInfo::Del(unsigned index)
|
||||
bool MemoInfo::HasIgnore(User *u)
|
||||
{
|
||||
for (unsigned i = 0; i < this->ignores.size(); ++i)
|
||||
if (u->nick.equals_ci(this->ignores[i]) || (u->Account() && u->Account()->display.equals_ci(this->ignores[i])) || Anope::Match(u->GetMask(), Anope::string(this->ignores[i])))
|
||||
if (u->nick.equals_ci(this->ignores[i]) || (u->IsIdentified() && u->Account()->display.equals_ci(this->ignores[i])) || Anope::Match(u->GetMask(), Anope::string(this->ignores[i])))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user