summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2025-12-02 19:43:01 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2025-12-02 19:46:11 +0200
commit88a3d951fd15863bfd77b9b7137e9c02c21a4a10 (patch)
tree6f62c2ab2e1ddc1cd74771b7fb5ebfee3726c90e
parent8b1e44eb7c95e1c7ef17447bada0f775c0fe4805 (diff)
#5088 Hide 'Moderation options' menu when disconnected from spatial voice
-rw-r--r--indra/newview/llnearbyvoicemoderation.cpp8
1 files changed, 8 insertions, 0 deletions
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