summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/memoserv.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-11-11 16:46:56 +0000
committerSadie Powell <sadie@witchery.services>2024-11-11 16:46:56 +0000
commit96ccfe4cbe9948206ac2d6854778f9a268d2476f (patch)
tree1e2059a204088051b0155b58de56bacaa2bfd58e /modules/pseudoclients/memoserv.cpp
parentee160842b3ccab37f005c16a8657781e0e0412fd (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/pseudoclients/memoserv.cpp')
-rw-r--r--modules/pseudoclients/memoserv.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp
index 8019086c6..cdfa93599 100644
--- a/modules/pseudoclients/memoserv.cpp
+++ b/modules/pseudoclients/memoserv.cpp
@@ -100,7 +100,7 @@ class MemoServCore : public Module, public MemoServService
if (ci->AccessFor(cu->user).HasPriv("MEMO"))
{
- if (cu->user->Account() && cu->user->Account()->HasExt("MEMO_RECEIVE"))
+ if (cu->user->IsIdentified() && cu->user->Account()->HasExt("MEMO_RECEIVE"))
cu->user->SendMessage(MemoServ, MEMO_NEW_X_MEMO_ARRIVED, ci->name.c_str(), Config->StrictPrivmsg.c_str(), MemoServ->nick.c_str(), ci->name.c_str(), mi->memos->size());
}
}