src/server/cloak/room.js
function(user) {
      if (!this._shouldAllowUser(user)) {
        return false;
      }
      user.leaveRoom();
      this.members.push(user);
      user.room = this;
      if (this.minRoomMembers !== null &&
          this.members.length >= this.minRoomMembers) {
        this._hasReachedMin = true;
      }
      this._emitEvent('newMember', this, user);
      this._serverMessageMembers(this.isLobby ? 'lobbyMemberJoined' : 'roomMemberJoined', _.pick(user, 'id', 'name'));
      user._serverMessage('joinedRoom', _.pick(this, 'name'));
      return true;
    }
function(user) {
      if (!this._shouldAllowUser(user)) {
        return false;
      }
      user.leaveRoom();
      this.members.push(user);
      user.room = this;
      if (this.minRoomMembers !== null &&
          this.members.length >= this.minRoomMembers) {
        this._hasReachedMin = true;
      }
      this._emitEvent('newMember', this, user);
      this._serverMessageMembers(this.isLobby ? 'lobbyMemberJoined' : 'roomMemberJoined', _.pick(user, 'id', 'name'));
      user._serverMessage('joinedRoom', _.pick(this, 'name'));
      return true;
    }
function ( user ) { if ( ! this . _shouldAllowUser ( user ) ) { return false ; } user . leaveRoom ( ) ; this . members . push ( user ) ; user . room = this ; if ( this . minRoomMembers !== null && this . members . length >= this . minRoomMembers ) { this . _hasReachedMin = true ; } this . _emitEvent ( 'newMember' , this , user ) ; this . _serverMessageMembers ( this . isLobby ? 'lobbyMemberJoined' : 'roomMemberJoined' , _ . pick ( user , 'id' , 'name' ) ) ; user . _serverMessage ( 'joinedRoom' , _ . pick ( this , 'name' ) ) ; return true ; }
return true if successful
return true if successful