Skip to content

Row 205 S6: blocking accounts (!ban, !unban, !dc, v83 /ban and /block) - #1008

Merged
neeerp merged 1 commit into
masterfrom
v83/gm-ban
Oct 25, 2026
Merged

neeerp merged 1 commit into
masterfrom
v83/gm-ban

Conversation

@neeerp

@neeerp neeerp commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Row 205 S6: blocking accounts, from chat and from the client's /ban and /block.

  • Accounts: ban_reason (Etc/BlockReason.img's number, 0 for none) and ban_until (none means for good). An ended block no longer counts (Account::blocked_at). banned, ban_msg and the new fields are skip_update, so a save of a stale account can't undo a ban.
  • Login: a blocked account gets result 2 with the reason and the end as a FILETIME (build_blocked_packet). v83 reads both (HeavenClient has done so since b128) and shows BlockReason.img's text and the date, or its plain notice for reason 0. The world also refuses entry to a blocked account, whether it comes from the character select or a channel change.
  • Chat commands:
    • !ban <name> [days] [reason] [note] (admin, level 3): the reason is a BlockReason.img type word or 1..=13, and leaving out the days makes the block permanent.
    • !unban <name> (admin).
    • !dc <name> (GM, level 2).
    • A block disconnects every character of the account that is online (new DirectoryMessage::Kick).
    • None of these commands works on a GM whose level is the sender's or higher.
    • Each one logs a line under gm_audit.
  • Slash commands:
    • ADMIN_COMMAND 0x03 (/ban NAME) blocks for good with no reason.
    • 0x04 (/block, sent from v83's dialog: name, reason, days, note) blocks as !ban does.
    • Both reply with ADMIN_RESULT 4 0 ("You have successfully blocked access."), or 6 1 ("invalid character name") when no character has that name or the target outranks the sender. HeavenClient already shows both.
    • 0x04 with no days is ignored; the client never sends it.
  • Tests:
    • Unit tests cover the packet, the parsing and the tiers.
    • The new harness test gm_ban checks a ban, the disconnect, the refused login with its reason and date, !unban, !dc, the rank check, and /ban and /block.
    • gm_commands, gm_slash, login_grade and login_to_world pass.

HeavenClient's /block dialog comes next (S6b).

…an 0x80 0x03 and /block 0x04 -> ADMIN_RESULT 4/6), login result 2 with BlockReason and FILETIME, kick by account, world entry refuses blocked accounts
@neeerp
neeerp merged commit eb078e2 into master Oct 25, 2026
1 check passed
@neeerp
neeerp deleted the v83/gm-ban branch October 25, 2026 20:00
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