message: Emit a disabled if a cached mode is no longer present.
diff: @@ -911,10 +911,25 @@ IrcHandler.prototype.onModeIs = Promise.coroutine(function*(req, server, channel
  }
  );
  - // If the channel does not have 's' as part of its mode, trigger the equivalent of '-s'
  - if (mode.indexOf('s') === -1) {
  - promises.push(this.onMode(req, server, channel, 'onModeIs function', 's', false));
  + // We cache modes per room, so extract the set of modes for all these rooms.
  + const roomModeMap = yield this.ircBridge.getStore().getModesForChannel(server, channel);
  + const oldModes = new Set();
  + Object.values(roomModeMap).forEach((mode) => {
  + mode.forEach((m) => {oldModes.add(m)});
  + });
  + req.log.debug(`Got cached mode for ${channel} ${[...oldModes]}`);
  +
  + // For each cached mode we have for the room, that is no longer set: emit a disabled mode.
  + promises.concat([...oldModes].map((oldModeChar) => {
  + if (!MODES_TO_WATCH.includes(oldModeChar)) {
  + return Promise.resolve();
  + }
  + req.log.debug(`${server.domain} ${channel}: Checking if cached mode '${oldModeChar}' is still set.`);
  + if (!mode.includes(oldModeChar)) { // If the mode is no longer here.
  + req.log.debug(`${oldModeChar} has been unset, disabling.`);
  + return this.onMode(req, server, channel, 'onModeIs function', oldModeChar, false);
  }
  + }));
  yield Promise.all(promises);
  });
  