Skip to content

Refactor music lock system: allow DJs to bypass lock#377

Merged
SyntaxNyah merged 1 commit into
mainfrom
claude/vibrant-faraday-Y0N9u
Jun 3, 2026
Merged

Refactor music lock system: allow DJs to bypass lock#377
SyntaxNyah merged 1 commit into
mainfrom
claude/vibrant-faraday-Y0N9u

Conversation

@SyntaxNyah
Copy link
Copy Markdown
Owner

Summary

Refactored the music lock system to clarify its purpose and expand who can bypass it. The /musiclock and /musicunlock commands 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() and CanChangeMusic() methods.

  • Lowered command permissions: Changed /musiclock and /musicunlock from requiring CM permission to requiring only DJ permission, making the feature more accessible to area DJs.

  • Clarified messaging:

    • Replaced "frozen" terminology with "locked" throughout user-facing messages for consistency
    • Updated command descriptions to explicitly state "only moderators and DJs can change it"
    • Changed area announcements to use em-dashes and clearer language (e.g., "🔒 has locked the music — only moderators and DJs can change it")
  • Updated documentation: Revised code comments in areas.go to 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:

if client.Area().MusicFrozen() && !permissions.IsModerator(client.Perms()) && !client.HasCMPermission() && !permissions.HasPermission(client.Perms(), permissions.PermissionField["DJ"])

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

- 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
@SyntaxNyah SyntaxNyah merged commit 3940507 into main Jun 3, 2026
3 checks passed
@SyntaxNyah SyntaxNyah deleted the claude/vibrant-faraday-Y0N9u branch June 3, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants