Have /hidereplay turn on /modjoin % once the battle is over (#5667)

This commit is contained in:
Kirk Scheibelhut 2019-08-02 22:19:33 +02:00 committed by GitHub
parent 41e81a359b
commit 3021826112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -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();
}
/**

View File

@ -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;