From 88a3d951fd15863bfd77b9b7137e9c02c21a4a10 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 2 Dec 2025 19:43:01 +0200 Subject: #5088 Hide 'Moderation options' menu when disconnected from spatial voice --- indra/newview/llnearbyvoicemoderation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llnearbyvoicemoderation.cpp b/indra/newview/llnearbyvoicemoderation.cpp index 668365d266..a5ee0e9423 100644 --- a/indra/newview/llnearbyvoicemoderation.cpp +++ b/indra/newview/llnearbyvoicemoderation.cpp @@ -29,6 +29,7 @@ #include "llnotificationsutil.h" #include "llviewerregion.h" #include "llvoavatar.h" +#include "llvoicechannel.h" #include "llvoiceclient.h" #include "llviewerobjectlist.h" #include "llviewerparcelmgr.h" @@ -200,6 +201,13 @@ bool LLNearbyVoiceModeration::isNearbyChatModerator() return false; } + // Only show moderator options when connected to spatial voice chat + LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel(); + if (!channel || channel->getSessionID().notNull() || !LLAgent::isActionAllowed("speak")) + { + return false; + } + if (LLViewerParcelMgr::getInstance()->isVoiceRestricted()) { // Only the parcel owner should have access to moderate parcel voice space -- cgit v1.3