1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Cache the NickCore in rpc_user.

This commit is contained in:
Sadie Powell
2025-11-08 18:04:16 +00:00
parent 0ea89852d0
commit fb1014a53c
+5 -4
View File
@@ -59,7 +59,8 @@ private:
if (!na)
return; // Should never happen.
if (na->nc->HasExt("NS_SUSPENDED"))
NickCore *nc = na->nc;
if (nc->HasExt("NS_SUSPENDED"))
{
request.Error(ERR_ACCOUNT_SUSPENDED, "Account suspended");
rpcinterface->Reply(request);
@@ -68,9 +69,9 @@ private:
}
auto &root = request.Root();
root.Reply("account", na->nc->display)
.Reply("confirmed", !na->nc->HasExt("UNCONFIRMED"))
.Reply("uniqueid", na->nc->GetId());
root.Reply("account",nc->display)
.Reply("confirmed", !nc->HasExt("UNCONFIRMED"))
.Reply("uniqueid", nc->GetId());
rpcinterface->Reply(request);
client->SendReply(&request.reply);