Repository navigation
Row 205 S6a: !jail and !unjail - #1014
Merged
Merged
Conversation
…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
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.
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
jails (character_id, until)anddb::jail.jailadds the minutes to any time left, inside a transaction.releaseandjailed_untilonly count rows still in force.!jaildefaults to 5 minutes, with at most a year per command. Anything else, or 0, gives the usage line. The usual discipline rank check applies.DirectoryMessage::JailChangedand 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.hold_in_jail). A dead player isn't moved, because their revival is itself a map change.!unjail, the player comes out at 300000010in01and 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.InventoryTypeimports 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
gm_jailcovers the online jail, the warp back, the time adding up, the rank, unknown-name and usage lines, a relog in jail,!unjailto in01, and an offline jail plus the timer release.gm_banandchange_channelalso pass.jail_reads_its_minutes.Reviewed by one Sonnet pass (size M). Fixed from it:
end_jailre-reads the DB, and dead players aren't warped.