Skip to content

Lift vacation time-lock when unbanning a player#1493

Closed
tiweb442 wants to merge 1 commit into
lanedirt:mainfrom
tiweb442:fix/1395-unban-vacation-restriction
Closed

Lift vacation time-lock when unbanning a player#1493
tiweb442 wants to merge 1 commit into
lanedirt:mainfrom
tiweb442:fix/1395-unban-vacation-restriction

Conversation

@tiweb442

Copy link
Copy Markdown
Contributor

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_until stayed 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_mode stays 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.php

Made with Cursor

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>
@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown

Preview deployment

Status URL Commit
❌ Destroyed pr-1493.preview.ogamex.dev -

Preview environment has been cleaned up.

@tiweb442

Copy link
Copy Markdown
Contributor Author

Related PRs from tiweb442 (same deployment / review batch)

Issue PR
#1395 Unban does not lift vacation restriction #1493 (this)
#1472 Phalanx wrap-around #1491
#1446 Fleet movement during moon destruction #1492
#1341 Destroyed moons break messages #1494
#1327 Email system #1375

Overlap: Same approach as #1411 (piciolo). This PR adds testUnbanLiftsVacationModeUntilRestriction while keeping vacation mode enabled until the player disables it manually.

Merge order: Independent — no conflicts with #1491, #1492, or #1494.

@tiweb442

Copy link
Copy Markdown
Contributor Author

Ready for maintainer review — preview is live and mergeable with main.

@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

@tiweb442

Copy link
Copy Markdown
Contributor Author

Closing in favor of upstream #1411 (same unban logic). This PR was opened as a non-draft alternative with testUnbanLiftsVacationModeUntilRestriction; that test can be cherry-picked onto #1411 if maintainers want it. Fix is already deployed on tiweb442's server.

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.

[BUG] Unbanning player does not lift vacation mode restrictions

1 participant