From 96ccfe4cbe9948206ac2d6854778f9a268d2476f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 11 Nov 2024 16:46:56 +0000 Subject: 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. --- modules/protocol/unreal4.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/protocol/unreal4.cpp') diff --git a/modules/protocol/unreal4.cpp b/modules/protocol/unreal4.cpp index 939a68eea..1147b10e8 100644 --- a/modules/protocol/unreal4.cpp +++ b/modules/protocol/unreal4.cpp @@ -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); } }; -- cgit