diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-11-07 17:19:56 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-11-07 17:19:56 +0200 |
| commit | c39135cd848305c3acfcbd6dd2fc817cd09951de (patch) | |
| tree | 35955a2a802e6f0a8cfdf2b4039a961f006bed54 /indra/newview/llviewerparcelmgr.cpp | |
| parent | cf048cf9c3ebd9ca8ee1e606b69bc459b62ed1c5 (diff) | |
#4013 add simple voice moderation permission check
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
| -rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 432da2e990..452c666652 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -702,6 +702,16 @@ bool LLViewerParcelMgr::allowAgentVoice() const return allowAgentVoice(gAgent.getRegion(), mAgentParcel); } +bool LLViewerParcelMgr::isVoiceRestricted() const +{ + return mAgentParcel && !mAgentParcel->getParcelFlagUseEstateVoiceChannel(); +} + +bool LLViewerParcelMgr::allowVoiceModeration() const +{ + return isVoiceRestricted() && isParcelOwnedByAgent(mAgentParcel, GP_SESSION_MODERATOR); +} + bool LLViewerParcelMgr::allowAgentVoice(const LLViewerRegion* region, const LLParcel* parcel) const { return region && region->isVoiceEnabled() |
