[PR #117] [MERGED] SMP 0.15.0: nicknames that can't pass for someone else #119

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

📋 Pull Request Information

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

Base: main ← Head: fix/smp-nick-abuse


📝 Commits (1)

  • 3395149 SMP 0.15.0: nicknames that can't pass for someone else

📊 Changes

7 files changed (+527 additions, -104 deletions)

View changed files

📝 native/smp/Cargo.lock (+1 -1)
📝 native/smp/Cargo.toml (+1 -1)
📝 native/smp/README.md (+15 -7)
📝 native/smp/mixins/smp/glue.rs (+34 -8)
📝 native/smp/mixins/smp/horizon-mixin.toml (+1 -1)
📝 native/smp/mixins/smp/smp_nick.rs (+438 -71)
📝 native/smp/proof.py (+37 -15)

📄 Description

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

rdbt (Team moderator) reported /nick abuse on the official server: nicknames copying players, staff and the server. This tightens the rules and cleans up what's already there.

What changes

  • Nicknames show as ~name in chat, the Tab list and the sidebar.
  • Names are compared case-insensitively, with _ dropped and look-alikes folded (0→o, 1/i→l, 3→e, 4→a, 5→s, 7→t, 8→b, 9→g).
  • Refused: a nickname equal to, or containing (from 4 letters), a known player's name (economy accounts, usercache.json), an operator's, a Team member's (nicks.protected: rdbt, rdbtclient, luzW, bunchy7s, lu4ovic, ludovic, dezer-x, levzzz) or another player's nickname; or one that reads as a reserved word (nicks.reserved: server, console, admin, mod, moderator, owner, staff, op, horizon, kira, system, error, notch, jeb, dinnerbone, mojang, microsoft, herobrine). The chat filter check and the cooldown stay.
  • nicks.min_playtime_minutes (60): play needed before a first nickname; operators are exempt.
  • At start, nicknames breaking these rules are taken off, and each is logged: [smp] nickname X of Y taken off: why.
  • /pay, /tpa, /trade, /playtime, /tpaccept, /tpdeny and /eco accept a nickname (with or without ~) wherever they take a player's name. /nick alone explains how to take a nickname off.
  • /msg, /tell and /w are vanilla commands, so mods can't register them. Accepting nicknames there needs an engine change: horizon-rust/horizon#5575, which will ship separately.

The config section stays nicks (as in 0.13), so the live config.json keeps working.

Tests

  • 70 unit tests, including the nick tests (skeleton, form, reserved words incl. Opal/Modest/Hopper allowed, names, Team members and other nicks, tilde, playtime, cooldown, purge, resolve, operators). cargo clippy -D warnings and fmt are clean.
  • native.py check smp: ok.
  • native.py proof smp (Horizon c348d5d): EXIT 0. The new nick step covers:
    • a seeded N0tch nickname cleared at start, with its log line;
    • /nick usage;
    • Alex, A1ex_, N0tch and ab refused;
    • /nick Rocky → <~Rocky> hello from rocky in the other player's chat, with ~Rocky in Tab;
    • /realname ~rocky → "~Rocky is Steve.";
    • R0cky refused for the other player;
    • /pay Rocky 1 paid to Steve;
    • the cooldown;
    • an op's /nick Steve off.

🤖 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-mods/pull/117 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/smp-nick-abuse` --- ### 📝 Commits (1) - [`3395149`](https://github.com/horizon-rust/horizon-mods/commit/3395149802ab8bc2e6b41025ce86f7a372cdba75) SMP 0.15.0: nicknames that can't pass for someone else ### 📊 Changes **7 files changed** (+527 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `native/smp/Cargo.lock` (+1 -1) 📝 `native/smp/Cargo.toml` (+1 -1) 📝 `native/smp/README.md` (+15 -7) 📝 `native/smp/mixins/smp/glue.rs` (+34 -8) 📝 `native/smp/mixins/smp/horizon-mixin.toml` (+1 -1) 📝 `native/smp/mixins/smp/smp_nick.rs` (+438 -71) 📝 `native/smp/proof.py` (+37 -15) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. rdbt (Team moderator) reported `/nick` abuse on the official server: nicknames copying players, staff and the server. This tightens the rules and cleans up what's already there. **What changes** - Nicknames show as `~name` in chat, the Tab list and the sidebar. - Names are compared case-insensitively, with `_` dropped and look-alikes folded (`0`→o, `1`/`i`→l, `3`→e, `4`→a, `5`→s, `7`→t, `8`→b, `9`→g). - Refused: a nickname equal to, or containing (from 4 letters), a known player's name (economy accounts, `usercache.json`), an operator's, a Team member's (`nicks.protected`: rdbt, rdbtclient, luzW, bunchy7s, lu4ovic, ludovic, dezer-x, levzzz) or another player's nickname; or one that reads as a reserved word (`nicks.reserved`: server, console, admin, mod, moderator, owner, staff, op, horizon, kira, system, error, notch, jeb, dinnerbone, mojang, microsoft, herobrine). The chat filter check and the cooldown stay. - `nicks.min_playtime_minutes` (60): play needed before a first nickname; operators are exempt. - At start, nicknames breaking these rules are taken off, and each is logged: `[smp] nickname X of Y taken off: why`. - `/pay`, `/tpa`, `/trade`, `/playtime`, `/tpaccept`, `/tpdeny` and `/eco` accept a nickname (with or without `~`) wherever they take a player's name. `/nick` alone explains how to take a nickname off. - `/msg`, `/tell` and `/w` are vanilla commands, so mods can't register them. Accepting nicknames there needs an engine change: horizon-rust/horizon#5575, which will ship separately. The config section stays `nicks` (as in 0.13), so the live `config.json` keeps working. **Tests** - 70 unit tests, including the nick tests (skeleton, form, reserved words incl. Opal/Modest/Hopper allowed, names, Team members and other nicks, tilde, playtime, cooldown, purge, resolve, operators). `cargo clippy -D warnings` and `fmt` are clean. - `native.py check smp`: ok. - `native.py proof smp` (Horizon c348d5d): EXIT 0. The new nick step covers: - a seeded `N0tch` nickname cleared at start, with its log line; - `/nick` usage; - `Alex`, `A1ex_`, `N0tch` and `ab` refused; - `/nick Rocky` → `<~Rocky> hello from rocky` in the other player's chat, with `~Rocky` in Tab; - `/realname ~rocky` → "~Rocky is Steve."; - `R0cky` refused for the other player; - `/pay Rocky 1` paid to Steve; - the cooldown; - an op's `/nick Steve off`. 🤖 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 04:03:23 +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-mods#119
No description provided.