Skip to content

Row 205 S6a: !jail and !unjail - #1014

Merged
neeerp merged 1 commit into
masterfrom
v83/gm-jail
Oct 26, 2026
Merged

neeerp merged 1 commit into
masterfrom
v83/gm-jail

Conversation

@neeerp

@neeerp neeerp commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Row 205 S6a: !jail <name> [minutes] and !unjail <name> (tier 2, GM). v83 has no jail of its own, so this one is ours; Cosmic's maps and exit are the hint.

Server

  • New table jails (character_id, until) and db::jail.
    • jail adds the minutes to any time left, inside a transaction.
    • release and jailed_until only count rows still in force.
  • !jail defaults to 5 minutes, with at most a year per command. Anything else, or 0, gives the usage line. The usual discipline rank check applies.
  • An online target is told through DirectoryMessage::JailChanged and warped to 300000012 at once, with a pink line saying when they will be let out. An offline target is put there when they next enter the game.
  • Any map change while jailed ends with a warp back (hold_in_jail). A dead player isn't moved, because their revival is itself a map change.
  • When the time is up (checked again in the DB first), or at !unjail, the player comes out at 300000010 in01 and hears "You are free to go.". A player freed while offline or in the Cash Shop logs in at 300000010, the jail map's forcedReturn.
  • Also removes two unused InventoryType imports left by Row 2003 (b144 C): the second pendant slot, client and server #1013.

Known limit: a jailed player who warps elsewhere joins that map before the warp back, because its SET_FIELD has already gone out.

Tests

  • Harness: new gm_jail covers the online jail, the warp back, the time adding up, the rank, unknown-name and usage lines, a relog in jail, !unjail to in01, and an offline jail plus the timer release. gm_ban and change_channel also pass.
  • Unit: jail_reads_its_minutes.

Reviewed by one Sonnet pass (size M). Fixed from it: end_jail re-reads the DB, and dead players aren't warped.

…00000012 until their time is up (kept in the jails table, so offline, relog and channel changes too; any map change warps them back) and let them out at 300000010 in01
@neeerp
neeerp merged commit 43e5633 into master Oct 26, 2026
1 check passed
@neeerp
neeerp deleted the v83/gm-jail branch October 26, 2026 00:41
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.

1 participant