diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index de96e2cb6..c1dd2aba4 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -44,6 +44,7 @@ import { andFN, manhattanDistFN, TileRef } from "./GameMap"; import { AttackImpl } from "./AttackImpl"; import { PseudoRandom } from "../PseudoRandom"; import { consolex } from "../Consolex"; +import { sanitizeUsername } from "../validations/username"; interface Target { tick: Tick; @@ -101,7 +102,7 @@ export class PlayerImpl implements Player { startTroops: number, ) { this._flag = playerInfo.flag; - this._name = playerInfo.name; + this._name = sanitizeUsername(playerInfo.name); this._targetTroopRatio = 95n; this._troops = toInt(startTroops); this._workers = 0n;