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/commands/ns_status.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/commands/ns_status.cpp') diff --git a/modules/commands/ns_status.cpp b/modules/commands/ns_status.cpp index d0e15cc92..04a43ef64 100644 --- a/modules/commands/ns_status.cpp +++ b/modules/commands/ns_status.cpp @@ -36,7 +36,7 @@ class CommandNSStatus : public Command else if (u2->IsIdentified() && na && na->nc == u2->Account()) /* Nick is identified */ source.Reply("STATUS %s %d %s", nickbuf.c_str(), 3, u2->Account()->display.c_str()); else if (u2->IsRecognized()) /* Nick is recognised, but NOT identified */ - source.Reply("STATUS %s %d %s", nickbuf.c_str(), 2, u2->Account() ? u2->Account()->display.c_str() : ""); + source.Reply("STATUS %s %d %s", nickbuf.c_str(), 2, u2->IsIdentified() ? u2->Account()->display.c_str() : ""); else if (!na) /* Nick is online, but NOT a registered */ source.Reply("STATUS %s %d %s", nickbuf.c_str(), 0, ""); else -- cgit