Refactor music lock system: allow DJs to bypass lock#377
Merged
Conversation
- Remove the warning message sent to targets when they are ignored, so users don't know when someone ignores them - Allow DJs (not just mods/CMs) to use /musiclock and /musicunlock - Exempt DJs from the music lock so they can still play when it's active - Update announcements to say "locked/unlocked" instead of "frozen/unfrozen" https://claude.ai/code/session_012Weg2Teoh5VB19DtQkYZmA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactored the music lock system to clarify its purpose and expand who can bypass it. The
/musiclockand/musicunlockcommands now explicitly allow DJs (in addition to moderators and CMs) to change music when locked, and the permission requirement to use these commands has been lowered from CM-only to DJ-level.Key Changes
Updated music lock behavior: DJs can now change music even when the area is locked, matching the documented intent. Added DJ permission check to both
cmdPlay()andCanChangeMusic()methods.Lowered command permissions: Changed
/musiclockand/musicunlockfrom requiring CM permission to requiring only DJ permission, making the feature more accessible to area DJs.Clarified messaging:
Updated documentation: Revised code comments in
areas.goto reflect that DJs are now exempt from the music lock restriction.Removed unrelated change: Removed the warning message sent to users when they are permanently ignored (in
cmdIgnore), as this was outside the scope of the music lock refactor.Implementation Details
The music lock check now includes an additional condition:
This ensures that moderators, CMs, and DJs all retain the ability to change music when an area is locked, while regular players cannot.
https://claude.ai/code/session_012Weg2Teoh5VB19DtQkYZmA