Lift vacation time-lock when unbanning a player#1493
Closed
tiweb442 wants to merge 1 commit into
Closed
Conversation
Timed bans enable vacation mode with a 48h minimum. Unbanning now sets vacation_mode_until to now() so the player can leave vacation immediately while keeping vacation_mode on until they choose to disable it. Fixes lanedirt#1395 Co-authored-by: Cursor <cursoragent@cursor.com>
Preview deployment
Preview environment has been cleaned up. |
3 tasks
Contributor
Author
Related PRs from tiweb442 (same deployment / review batch)
Overlap: Same approach as #1411 (piciolo). This PR adds Merge order: Independent — no conflicts with #1491, #1492, or #1494. |
Contributor
Author
|
Ready for maintainer review — preview is live and mergeable with @lanedirt @jackbayliss Could you review when you have a moment? Fork PRs may also need “Approve and run workflows” so Pint / PHPStan / Docker tests run (currently only PR Preview has completed). Test on preview: https://pr-1493.preview.ogamex.dev |
Contributor
Author
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
When a timed ban activates vacation mode, the player gets a 48h minimum before they can leave vacation. If an admin unbans them early, the ban is lifted but
vacation_mode_untilstayed in the future — effectively extending the restriction up to 48 hours after the ban ended.This sets
vacation_mode_until = now()on unban when vacation is still time-locked.vacation_modestays enabled until the player disables it manually.Same approach as #1411; includes a regression test.
Fixes #1395
Test plan
./vendor/bin/phpunit tests/Feature/BanTest.phpMade with Cursor