From 06ec88fd5b62c3fee87b900f6213794341df6333 Mon Sep 17 00:00:00 2001 From: Juanma Serrano Date: Mon, 19 Oct 2015 10:30:33 +0200 Subject: [PATCH] Make users with makeroom permission able to ignore modjoin A user that is capable of creating a private room (ie. a leader) should be able to join a modjoined room anyway. --- users.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/users.js b/users.js index 2c8e1d3290cc5..e7098c30da1a0 100644 --- a/users.js +++ b/users.js @@ -1329,8 +1329,8 @@ User = (function () { return false; } } - var bypassAll = this.can('bypassall'); - if (room.tour && !bypassAll) { + var makeRoom = this.can('makeroom'); + if (room.tour && !makeRoom) { var tour = room.tour.tour; var errorMessage = tour.onBattleJoin(room, this); if (errorMessage) { @@ -1338,7 +1338,7 @@ User = (function () { return false; } } - if (room.modjoin && !bypassAll) { + if (room.modjoin && !makeRoom) { var userGroup = this.group; if (room.auth) { if (room.isPrivate === true) {