Skip to content

Commit

Permalink
Fix private forpunishment replays from regenerating new passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet committed Sep 26, 2024
1 parent d155b49 commit 8ac3035
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2051,11 +2051,10 @@ export class GameRoom extends BasicRoom {
const silent = options === 'forpunishment' || options === 'silent' || options === 'auto';
if (silent) connection = undefined;
const isPrivate = this.settings.isPrivate || this.hideReplay;
const hidden = options === 'forpunishment' || options === 'auto' ? 10 :
(this as any).unlistReplay ? 2 :
const hidden = options === 'auto' ? 10 :
options === 'forpunishment' || (this as any).unlistReplay ? 2 :
isPrivate ? 1 :
0;

if (isPrivate && hidden === 10) {
password = Replays.generatePassword();
}
Expand Down

0 comments on commit 8ac3035

Please sign in to comment.