Skip to content

Commit

Permalink
Make users with makeroom permission able to ignore modjoin
Browse files Browse the repository at this point in the history
A user that is capable of creating a private room (ie. a leader)
should be able to join a modjoined room anyway.
  • Loading branch information
Joimer committed Oct 19, 2015
1 parent 48e4bc4 commit 06ec88f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions users.js
Original file line number Diff line number Diff line change
Expand Up @@ -1329,16 +1329,16 @@ 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) {
connection.sendTo(roomid, "|noinit|joinfailed|" + errorMessage);
return false;
}
}
if (room.modjoin && !bypassAll) {
if (room.modjoin && !makeRoom) {
var userGroup = this.group;
if (room.auth) {
if (room.isPrivate === true) {
Expand Down

0 comments on commit 06ec88f

Please sign in to comment.