message: Add BridgedClient.inChannel
diff: @@ -272,12 +272,12 @@ BridgedClient.prototype._leaveChannel = function(channel, reason) {
  if (!this.inst || this.inst.dead) {
  return Promise.resolve(); // we were never connected to the network.
  }
  - if (Object.keys(this.unsafeClient.chans).indexOf(channel) === -1) {
  - return Promise.resolve(); // we were never joined to it.
  - }
  if (channel.indexOf("#") !== 0) {
  return Promise.resolve(); // PM room
  }
  + if (!this.inChannel(channel)) {
  + return Promise.resolve(); // we were never joined to it.
  + }
  var self = this;
  var defer = promiseutil.defer();
  this._removeChannel(channel);
  @@ -290,6 +290,10 @@ BridgedClient.prototype._leaveChannel = function(channel, reason) {
  return defer.promise;
  };
  +BridgedClient.prototype.inChannel = function(channel) {
  + return Object.keys(this.unsafeClient.chans).includes(channel);
  +}
  +
  BridgedClient.prototype.kick = function(nick, channel, reason) {
  reason = reason || "User kicked";
  if (!this.inst || this.inst.dead) {
  