diff --git a/server/room-battle.js b/server/room-battle.js index 15a45d20d3..5654828d7e 100644 --- a/server/room-battle.js +++ b/server/room-battle.js @@ -782,6 +782,8 @@ class RoomBattle extends RoomGames.RoomGame { if (parentGame && parentGame.onBattleWin) { parentGame.onBattleWin(this.room, winnerid); } + // If the room's replay was hidden, disable users from joining after the game is over + if (this.room.hideReplay) this.room.modjoin = '%'; this.room.update(); } /** diff --git a/server/rooms.js b/server/rooms.js index 3e99ec1191..e151e5226d 100644 --- a/server/rooms.js +++ b/server/rooms.js @@ -88,6 +88,7 @@ class BasicRoom { this.chatRoomData = null; /** @type {boolean | 'hidden' | 'voice'} */ this.isPrivate = false; + this.hideReplay = false; this.isPersonal = false; /** @type {string | boolean} */ this.isHelp = false;