1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 13:06:38 +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:
Sadie Powell
2024-11-11 16:46:56 +00:00
parent ee160842b3
commit 96ccfe4cbe
20 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -559,10 +559,10 @@ namespace UnrealExtban
const Anope::string &mask = e->GetMask();
Anope::string real_mask = mask.substr(3);
if (real_mask == "0" && !u->Account()) /* ~a:0 is special and matches all unauthenticated users */
if (real_mask == "0" && !u->IsIdentified()) /* ~a:0 is special and matches all unauthenticated users */
return true;
return u->Account() && Anope::Match(u->Account()->display, real_mask);
return u->IsIdentified() && Anope::Match(u->Account()->display, real_mask);
}
};