[GH-ISSUE #6393] RCON: the Rcon command source and broadcast-rcon-to-ops #2075

Closed
opened 2026-11-02 15:51:51 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Akirabane on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6393

Originally assigned to: @Akirabane on GitHub.

🤖 Filed by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review.

RCON (#5416) runs a command as the server's console. Vanilla runs it as its own source, Rcon, and broadcast-rcon-to-ops (read from server.properties since horizon-server-files) decides whether operators in the game see what it did. Both gaps are listed as "Not yet" in docs/server.md and docs/hosting.md, and as a gap on RconConsoleSource.createCommandSourceStack in tools/port_map/rest-020.tsv. Nothing reads broadcast-rcon-to-ops today.

No issue, pull request or branch for it that I could find on origin/main dd69edfbc (searched rcon, broadcast-rcon-to-ops and Rcon in open and closed pull requests and issues).

What vanilla does (RconConsoleSource, read with javap on the 26.3 server jar)

  • createCommandSourceStack: the source is at the Overworld's respawn position (getRespawnData().pos(), lower corner), rotation zero, permission LevelBasedPermissionSet.OWNER (level 4), named Rcon (display name Rcon).
  • acceptsSuccess and acceptsFailure are true: the output goes back to the RCON client (already done).
  • shouldInformAdmins is MinecraftServer.shouldRconBroadcast(), which is broadcast-rcon-to-ops (default true): a command's success that vanilla broadcasts reaches every operator online as [Rcon: <message>], gray and italic, when send_command_feedback is on, and the console log when log_admin_commands is on.

Plan

One pull request:

  • A new control request rcon <line> beside console <line> (dedicated/status.rs), which runs the command with the Rcon source: the respawn position, level 4, name Rcon.
  • Operators get the feedback through the existing send_admin_feedback queue (as for a player's command and, since #6097, a command block's), only when broadcast-rcon-to-ops is true.
  • rcon.rs calls rcon instead of console. The text returned to the RCON client stays the same.
  • Docs and the ledger row updated.

How it is checked

Against a vanilla 26.3 server with the same settings: an RCON client sends commands (say, time set day, tp @s ~ ~ ~-style position checks, execute run ...) while an operator is online, and the raw replies and what the operator receives are compared with Horizon's, with broadcast-rcon-to-ops true and false. Unit tests for the source and the broadcast rule. No bots and no benchmark.

I'm claiming it next, and will say here if the design needs to change.

Originally created by @Akirabane on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6393 Originally assigned to: @Akirabane on GitHub. > 🤖 Filed by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review. RCON (#5416) runs a command as the server's console. Vanilla runs it as its own source, `Rcon`, and `broadcast-rcon-to-ops` (read from `server.properties` since `horizon-server-files`) decides whether operators in the game see what it did. Both gaps are listed as "Not yet" in `docs/server.md` and `docs/hosting.md`, and as a gap on `RconConsoleSource.createCommandSourceStack` in `tools/port_map/rest-020.tsv`. Nothing reads `broadcast-rcon-to-ops` today. No issue, pull request or branch for it that I could find on `origin/main` dd69edfbc (searched `rcon`, `broadcast-rcon-to-ops` and `Rcon` in open and closed pull requests and issues). ## What vanilla does (`RconConsoleSource`, read with `javap` on the 26.3 server jar) - `createCommandSourceStack`: the source is at the Overworld's respawn position (`getRespawnData().pos()`, lower corner), rotation zero, permission `LevelBasedPermissionSet.OWNER` (level 4), named `Rcon` (display name `Rcon`). - `acceptsSuccess` and `acceptsFailure` are true: the output goes back to the RCON client (already done). - `shouldInformAdmins` is `MinecraftServer.shouldRconBroadcast()`, which is `broadcast-rcon-to-ops` (default `true`): a command's success that vanilla broadcasts reaches every operator online as `[Rcon: <message>]`, gray and italic, when `send_command_feedback` is on, and the console log when `log_admin_commands` is on. ## Plan One pull request: - A new control request `rcon <line>` beside `console <line>` (`dedicated/status.rs`), which runs the command with the `Rcon` source: the respawn position, level 4, name `Rcon`. - Operators get the feedback through the existing `send_admin_feedback` queue (as for a player's command and, since #6097, a command block's), only when `broadcast-rcon-to-ops` is true. - `rcon.rs` calls `rcon` instead of `console`. The text returned to the RCON client stays the same. - Docs and the ledger row updated. ## How it is checked Against a vanilla 26.3 server with the same settings: an RCON client sends commands (`say`, `time set day`, `tp @s ~ ~ ~`-style position checks, `execute run ...`) while an operator is online, and the raw replies and what the operator receives are compared with Horizon's, with `broadcast-rcon-to-ops` true and false. Unit tests for the source and the broadcast rule. No bots and no benchmark. I'm claiming it next, and will say here if the design needs to change.
Author
Owner

@Akirabane commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6563297046 --> @Akirabane commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
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#2075
No description provided.