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 /modules/protocol | |
| 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 'modules/protocol')
| -rw-r--r-- | modules/protocol/inspircd20.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/inspircd3.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/unreal.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/unreal4.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 9dbaf69c0..faf064bdd 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -253,7 +253,7 @@ namespace InspIRCdExtban { const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(2); - return !u->Account() && Entry("BAN", real_mask).Matches(u); + return !u->IsIdentified() && Entry("BAN", real_mask).Matches(u); } }; } diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index 45d877d78..05371c091 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -699,7 +699,7 @@ namespace InspIRCdExtban { const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(2); - return !u->Account() && Entry("BAN", real_mask).Matches(u); + return !u->IsIdentified() && Entry("BAN", real_mask).Matches(u); } }; diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index e6654ddc9..2fa883c10 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -537,7 +537,7 @@ namespace UnrealExtban const Anope::string &mask = e->GetMask(); Anope::string real_mask = mask.substr(3); - return u->Account() && Anope::Match(u->Account()->display, real_mask); + return u->IsIdentified() && Anope::Match(u->Account()->display, real_mask); } }; } 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); } }; |
