message: Make setting modes for rooms less racy
diff: @@ -883,7 +883,6 @@ IrcHandler.prototype._onPrivateMode = Promise.coroutine(function*(req, server, c
  "Reverting %s back to default join_rule"),
  room.getId()
  );
  - this.ircBridge.getStore().setModeForRoom(room.getId(), mode, enabled);
  if (enabled) {
  return this._setMatrixRoomAsInviteOnly(room, true);
  }
  @@ -898,7 +897,11 @@ IrcHandler.prototype._onPrivateMode = Promise.coroutine(function*(req, server, c
  }
  });
  - yield Promise.all(promises);
  + yield Promise.all(promises).then(() => {
  + matrixRooms.forEach((room) => {
  + this.ircBridge.getStore().setModeForRoom(room.getId(), mode, enabled);
  + });
  + });
  });
  /**
  