Skip to content

Row 205 S6c: !mute and !unmute (the v83 chat block) - #1015

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

neeerp merged 1 commit into
masterfrom
v83/gm-mute

Conversation

@neeerp

@neeerp neeerp commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Row 205 S6c: !mute <name> [minutes] [reason] and !unmute <name> (tier 2, GM). This is the client's own chat block (report b180).

What v83 does (2025 MapleRoyals client)

  • The block belongs to the account. Only the login result sets it: after the account name's flag come a reason byte (1..6, Etc/ChatBlockReason.img) and the FILETIME it ends.
  • From then on the client refuses all-chat, whispers, multi-chat, spouse chat, Messenger chat and mini-room chat itself, says "You are currently blocked from chatting.", and shows the reason on entering a field.
  • It never checks the end, and it has no packet that changes the block mid-session.

Server

  • Migration: accounts.chat_block_reason and accounts.chat_block_until. db::account::chat_block and chat_unblock write them, and Account::chat_blocked_at reads them.
  • The login result carries the reason and the end while the block lasts, and 0/0 after it ends.
  • !mute defaults to an hour and reason 1. The reason can be given by number or name (foul, advertising, hack, account, trading, penalty), and the minutes are capped at a year. A second !mute replaces the first. The usual discipline rank check applies.
  • The account's online characters hear of it through DirectoryMessage::ChatBlockChanged, with a pink line.
  • Until their next login the world drops their chat, using net::chat_block::is_chat, and answers with the client's line plus an enable-actions. That also covers the megaphones, Maple TV, kites, notes (Memo items), weather, the chalkboard and avatar megaphones, which the client never refuses.

Tests

  • Harness: new gm_mute covers:
    • an online mute, plus the rank and usage lines;
    • all-chat and a whisper dropped, with the line;
    • the login bytes after a relog (reason 2 and an end);
    • !unmute and chat that is seen again;
    • an offline mute in the login bytes, then 0/0 after !unmute.
  • gm_jail, gm_ban, local_chat_same_map, whisper_between_two_players and megaphones pass. The harness Trace now records CHAT_TEXT.
  • Sonnet review (size M) found no serious bugs. Fixed from it: notes are gated, and the unmute line says a client that logged in blocked needs a relog.
  • Unit: is_chat, mute_reads_its_minutes_and_reason and the login-result bytes. The net lib passes (1237).

…ount from chatting the v83 way (accounts.chat_block_reason/until in the login result per b180; the world drops chat, notes, megaphones and the chalkboard till the next login)
@neeerp
neeerp merged commit 64d0b6b into master Oct 26, 2026
1 check passed
@neeerp
neeerp deleted the v83/gm-mute branch October 26, 2026 01:05
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