[PR #5457] [MERGED] Dedicated server: admin_feedback_to_ops, so an operator's commands can stay out of the other operators' chat #6298

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5457
Author: @ludovic111
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/admin-feedback-issuer-only


📝 Commits (1)

  • 91df1e2 Dedicated server: admin_feedback_to_ops, so an operator's commands can stay out of the other operators' chat

📊 Changes

6 files changed (+43 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+7 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+3 -1)
📝 crates/horizon-client/src/lan/hub.rs (+5 -0)
📝 crates/horizon-server/src/config.rs (+19 -3)
📝 docs/api/server-reference.md (+1 -0)
📝 docs/hosting.md (+8 -0)

📄 Description

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

Why

On the official server, Ludovic asked that players not see when an operator runs /gamemode. The live log shows
lines like System chat: [lu4ovic: Set own game mode to Survival Mode]. Checked first: only operators get them.
Players who aren't operators never do, which matches vanilla's broadcastToAdmins (isOp). The System chat:
prefix is just how the console logs it. So no parity bug: this PR adds a Horizon option for servers that want
operators' commands kept out of the other operators' chat as well.

What

  • server.toml [server] admin_feedback_to_ops, written as horizon-admin-feedback-to-ops:
    • true (the default, vanilla): other operators read [name: ...] in gray, and the console logs it.
    • false: only the console's log keeps it. Each operator still reads their own command's answer.
  • docs/hosting.md documents it (template line and a section). docs/api/server-reference.md is regenerated.
  • The Discord bridge (#5372) and the anticheat never forward these lines:
    • the bridge posts only the structured events (chat, join, leave, death, kick);
    • the anticheat sends operators only its own alerts.
  • Command trees are already filtered per player's level (Commands.sendCommands), so op-only commands don't show
    in a non-op's tab completion.

Proof

  • python3 tools/parity.py server_ops_feedback: PASS (vanilla against Horizon). Ops get the feedback; a deop'd
    player and a non-op don't.

  • A live dedicated server with three real clients: Alice and Bob are ops, Carol isn't. Alice runs /gamemode.

    admin_feedback_to_ops Alice Bob (op) Carol (not op) latest.log
    default (true) Set own game mode to Creative Mode [Alice: Set own game mode to Creative Mode] nothing System chat: [Alice: ...]
    false Set own game mode to Survival Mode nothing nothing System chat: [Alice: ...]
  • cargo test -p horizon-server: 79 pass (defaults_are_vanilla accepts this key's true).

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at e26e78aa6, 13 min 0 s)

Check Result
Scope ✅ 6 files, +43 −4
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 505 passed (2 min 47 s)
rustfmt ✅ (9 s)
clippy ✅ (59 s)
tests: horizon-client, horizon-server ❌ 1494 passed, 8 failed (7 min 10 s)
doc tests ✅ 0 passed (30 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 37 affected, to run in CI (--quick): blending, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, held_item_stack and 25 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The 8 lan_bot failures are the same on the base e26e78a without this change, on the same machine (cargo test -p horizon-client --test lan_bot: 7 passed, 8 failed both ways); this PR touches no LAN path they use.

🤖 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/5457 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/admin-feedback-issuer-only` --- ### 📝 Commits (1) - [`91df1e2`](https://github.com/horizon-rust/horizon/commit/91df1e2cf5eab080b3683549cea0cda922939687) Dedicated server: admin_feedback_to_ops, so an operator's commands can stay out of the other operators' chat ### 📊 Changes **6 files changed** (+43 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+7 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+3 -1) 📝 `crates/horizon-client/src/lan/hub.rs` (+5 -0) 📝 `crates/horizon-server/src/config.rs` (+19 -3) 📝 `docs/api/server-reference.md` (+1 -0) 📝 `docs/hosting.md` (+8 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## Why On the official server, Ludovic asked that players not see when an operator runs `/gamemode`. The live log shows lines like `System chat: [lu4ovic: Set own game mode to Survival Mode]`. Checked first: only operators get them. Players who aren't operators never do, which matches vanilla's `broadcastToAdmins` (`isOp`). The `System chat:` prefix is just how the console logs it. So no parity bug: this PR adds a Horizon option for servers that want operators' commands kept out of the other operators' chat as well. ## What - `server.toml` `[server] admin_feedback_to_ops`, written as `horizon-admin-feedback-to-ops`: - `true` (the default, vanilla): other operators read `[name: ...]` in gray, and the console logs it. - `false`: only the console's log keeps it. Each operator still reads their own command's answer. - `docs/hosting.md` documents it (template line and a section). `docs/api/server-reference.md` is regenerated. - The Discord bridge (#5372) and the anticheat never forward these lines: - the bridge posts only the structured events (chat, join, leave, death, kick); - the anticheat sends operators only its own alerts. - Command trees are already filtered per player's level (`Commands.sendCommands`), so op-only commands don't show in a non-op's tab completion. ## Proof - `python3 tools/parity.py server_ops_feedback`: PASS (vanilla against Horizon). Ops get the feedback; a deop'd player and a non-op don't. - A live dedicated server with three real clients: Alice and Bob are ops, Carol isn't. Alice runs `/gamemode`. | `admin_feedback_to_ops` | Alice | Bob (op) | Carol (not op) | `latest.log` | |---|---|---|---|---| | default (`true`) | `Set own game mode to Creative Mode` | `[Alice: Set own game mode to Creative Mode]` | nothing | `System chat: [Alice: ...]` | | `false` | `Set own game mode to Survival Mode` | nothing | nothing | `System chat: [Alice: ...]` | - `cargo test -p horizon-server`: 79 pass (`defaults_are_vanilla` accepts this key's `true`). **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at e26e78aa6, 13 min 0 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +43 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 505 passed (2 min 47 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (59 s) | | tests: horizon-client, horizon-server | ❌ 1494 passed, 8 failed (7 min 10 s) | | doc tests | ✅ 0 passed (30 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 37 affected, to run in CI (--quick): blending, block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, held_item_stack and 25 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The 8 `lan_bot` failures are the same on the base `e26e78a` without this change, on the same machine (`cargo test -p horizon-client --test lan_bot`: 7 passed, 8 failed both ways); this PR touches no LAN path they use. 🤖 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:17:57 +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#6298
No description provided.