[PR #6813] [MERGED] Server: /mute, /tempmute and /mutelist for ops #7110

Closed
opened 2026-11-03 06:34:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6813
Author: @sdraeger
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: feat/manual-mutes


📝 Commits (1)

  • 4d0c0fb Server: /mute, /tempmute and /mutelist for ops

📊 Changes

8 files changed (+403 additions, -85 deletions)

View changed files

📝 crates/horizon-chat-filter/src/lib.rs (+92 -18)
📝 crates/horizon-chat-filter/src/tests.rs (+74 -6)
📝 crates/horizon-client/src/game/chat_filter.rs (+108 -18)
📝 crates/horizon-client/src/game/dedicated.rs (+8 -4)
📝 crates/horizon-client/src/game/lan_actions.rs (+3 -3)
📝 crates/horizon-client/src/lan/hub/chat_filter.rs (+84 -33)
📝 docs/chat-filter.md (+15 -2)
📝 tools/server_admin_e2e.py (+19 -1)

📄 Description

🤖 Opened by Simon's AI agent (Claude Code), not by Simon himself.

Fixes #6770. Operators of level 3 (/ban's) can now mute players by hand, on servers that filter chat, like /unmute:

  • /mute <player> [reason]: muted until /unmute.
  • /tempmute <player> <duration> [reason]: 30s, 10m, 2h, 1d, 1w.
  • /mutelist: every mute in force, the filter's and the operators', with who, until when and why.

The console takes the same words without the slash.

Manual mutes go into the filter's chat-filter-mutes.json with two new optional fields, by and reason. A permanent mute stores until: null, and files written before this change still load. A player muted by hand is told at once. Their chat and message commands get the filter's refusal, with the operator's reason instead of "slurs aren't allowed here". A filter mute never replaces a longer mute an operator gave. A name is looked up among the players online, then in the user cache, as the console's ban does, so in offline mode any name can be muted.

Manual mutes block what the filter's mutes block today: chat and message commands. They don't block signs, books or anvil names, which the issue mentions. I didn't touch the in-game /banlist report from the issue, since it still needs a repro.

Tests:

  • horizon-chat-filter unit tests cover manual mutes surviving a restart, old mute files, the filter not shortening an operator's mute, and duration parsing.
  • The hub's notice test covers the muted player's messages.
  • tools/server_admin_e2e.py runs mute, tempmute, mutelist and unmute on the console of a real dedicated server with two bots, and checks the replies and the mutes file. It passes on macOS.
  • Not tested end to end: an op typing the commands in game, and the muted player's message arriving.

pr_ready (tools/pr_ready.py --quick --base upstream/main on Mac, against upstream/main at 3a264943c, 3 min 10 s)

Check Result
Scope ✅ 8 files, +403 −85
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 602 passed (40 s)
rustfmt ✅ (4 s)
clippy ✅ (1 s)
tests: horizon-chat-filter, horizon-client, horizon-client-lib ✅ 1998 passed (2 min 15 s)
doc tests ✅ 0 passed (3 s)
content root tests ➖ content root untouched
mod API up to date ✅ (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 94 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, auto_jump, blending, block_removal, block_tint, boat_authority, boat_paddle_reset, boat_submerged, chest_pair, command_exec and 82 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6813 **Author:** [@sdraeger](https://github.com/sdraeger) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/manual-mutes` --- ### 📝 Commits (1) - [`4d0c0fb`](https://github.com/horizon-rust/horizon/commit/4d0c0fb6d17abb3523ac6d7008cc00570f4bbfae) Server: /mute, /tempmute and /mutelist for ops ### 📊 Changes **8 files changed** (+403 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-chat-filter/src/lib.rs` (+92 -18) 📝 `crates/horizon-chat-filter/src/tests.rs` (+74 -6) 📝 `crates/horizon-client/src/game/chat_filter.rs` (+108 -18) 📝 `crates/horizon-client/src/game/dedicated.rs` (+8 -4) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+3 -3) 📝 `crates/horizon-client/src/lan/hub/chat_filter.rs` (+84 -33) 📝 `docs/chat-filter.md` (+15 -2) 📝 `tools/server_admin_e2e.py` (+19 -1) </details> ### 📄 Description > 🤖 Opened by Simon's AI agent (Claude Code), not by Simon himself. Fixes #6770. Operators of level 3 (`/ban`'s) can now mute players by hand, on servers that filter chat, like `/unmute`: - `/mute <player> [reason]`: muted until `/unmute`. - `/tempmute <player> <duration> [reason]`: `30s`, `10m`, `2h`, `1d`, `1w`. - `/mutelist`: every mute in force, the filter's and the operators', with who, until when and why. The console takes the same words without the slash. Manual mutes go into the filter's `chat-filter-mutes.json` with two new optional fields, `by` and `reason`. A permanent mute stores `until: null`, and files written before this change still load. A player muted by hand is told at once. Their chat and message commands get the filter's refusal, with the operator's reason instead of "slurs aren't allowed here". A filter mute never replaces a longer mute an operator gave. A name is looked up among the players online, then in the user cache, as the console's `ban` does, so in offline mode any name can be muted. Manual mutes block what the filter's mutes block today: chat and message commands. They don't block signs, books or anvil names, which the issue mentions. I didn't touch the in-game `/banlist` report from the issue, since it still needs a repro. Tests: - `horizon-chat-filter` unit tests cover manual mutes surviving a restart, old mute files, the filter not shortening an operator's mute, and duration parsing. - The hub's notice test covers the muted player's messages. - `tools/server_admin_e2e.py` runs `mute`, `tempmute`, `mutelist` and `unmute` on the console of a real dedicated server with two bots, and checks the replies and the mutes file. It passes on macOS. - Not tested end to end: an op typing the commands in game, and the muted player's message arriving. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Mac, against upstream/main at 3a264943c, 3 min 10 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +403 −85 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 602 passed (40 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (1 s) | | tests: horizon-chat-filter, horizon-client, horizon-client-lib | ✅ 1998 passed (2 min 15 s) | | doc tests | ✅ 0 passed (3 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 94 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, auto_jump, blending, block_removal, block_tint, boat_authority, boat_paddle_reset, boat_submerged, chest_pair, command_exec and 82 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:34:00 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7110
No description provided.