diff options
author | Sadie Powell <sadie@witchery.services> | 2024-11-11 16:46:56 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-11-11 16:46:56 +0000 |
commit | 96ccfe4cbe9948206ac2d6854778f9a268d2476f (patch) | |
tree | 1e2059a204088051b0155b58de56bacaa2bfd58e /src/memos.cpp | |
parent | ee160842b3ccab37f005c16a8657781e0e0412fd (diff) |
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.
Diffstat (limited to 'src/memos.cpp')
-rw-r--r-- | src/memos.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memos.cpp b/src/memos.cpp index 141dcbb42..891b09aff 100644 --- a/src/memos.cpp +++ b/src/memos.cpp @@ -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; } |