Repository navigation
Replace /tfmc <track> promote|demote with /tfmc promote|demote - #49
Merged
Merged
Conversation
The step now follows the player's highest track: the last one in tfmc.yml whose promote or demote permission they hold. Adds the staff track (staff.promote / staff.demote). Track changes no longer need a restart because the command tree no longer depends on track names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Active helper+ and staff groups hold *, which matches every track's permissions, so the highest track is now the last one holding one of the player's own global groups. A step never adds a player to a track they are not on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Track steps act on a user's normal data, so a transient group no longer counts: stepping it would save it as permanent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Reviewed by GPT-6.1-Sol (xhigh) in two rounds: round 1 found transient groups counting as track membership (fixed in 77a12e7), round 2 OK. CodeRabbit is rate-limited, so admin-merging. |
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.
/tfmc promoteand/tfmc demotenow pick the track for the player. They act on the player's highest track: the last entry inhelper-tracksthat holds one of the player's own global LuckPerms groups. The default order ishelper,helper+,staff. Each step is offered only when the player also holds that step's permission on that track.The track is chosen by group membership rather than by permissions. The active
helper+,staff_inactiveandstaffgroups hold*, which matches every track's promote and demote permissions. A permission check would therefore send an on-duty helper+ to the staff track. As a further guard, a step never adds a player to a track they are not already on, whereas LuckPerms would otherwise add them to its first group.The per-track
/tfmc helper …and/tfmc helper+ …commands are removed. The defaulttfmc.ymladds astafftrack (staff.promote/staff.demote), and the failure message no longer says "helper". Track edits now apply with/tcore reload tfmc; they used to need a restart.Deployment notes: live
tfmc.ymlfiles need thestaffentry added by hand.staff_playerneedsstaff.promote;staff_inactiveandstaffalready pass through*.Tests:
tfmc-mvn -o -B clean verifypasses (100% line coverage gate).🤖 Generated with Claude Code