From 57925d1e110c320a692325f32fc3723dc1f91774 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 09:18:53 -0500 Subject: [PATCH] feat(moderation): a name decision shows as a popup to the player, as live did (issue 957) When staff approve or reject a character name while the player is online, the player gets a private announcement popup ("Name approved" / "Name not approved") as well as the chat line. Players who are offline still aren't told at their next login. Check: approve and reject a pending name while its player is online. Co-Authored-By: Claude Opus 5.5 --- dGame/dUtilities/DashboardActions.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dGame/dUtilities/DashboardActions.cpp b/dGame/dUtilities/DashboardActions.cpp index 8e13e4702..79e75545a 100644 --- a/dGame/dUtilities/DashboardActions.cpp +++ b/dGame/dUtilities/DashboardActions.cpp @@ -178,8 +178,18 @@ namespace { auto* character = entity ? entity->GetCharacter() : nullptr; if (!character) return 0; character->ApplyNameModeration(approved); - Tell(entity, approved ? "Your new name \"" + name + "\" was approved. Other players will see it after you next change worlds." - : "Your requested name \"" + name + "\" was not approved. You can pick another one at character select."); + const std::string text = approved ? "Your new name \"" + name + "\" was approved. Other players will see it after you next change worlds." + : "Your requested name \"" + name + "\" was not approved. You can pick another one at character select."; + // A private announcement popup, as live told the player, and the same text in chat + AMFArrayValue args; + args.Insert("title", std::string(approved ? "Name approved" : "Name not approved")); + args.Insert("message", text); + GameMessages::UIMessageServerToSingleClient uiMessage; + uiMessage.target = entity->GetObjectID(); + uiMessage.strMessageName = "ToggleAnnounce"; + uiMessage.args = std::move(args); + uiMessage.SendToClient(entity->GetSystemAddress()); + Tell(entity, text); return 1; }