message: Kick if we failed to get a bridged irc user for whatever reason.
diff: @@ -17,6 +17,8 @@ const MSG_PMS_DISABLED = "[Bridge] Sorry, PMs are disabled on this bridge.";
  const MSG_PMS_DISABLED_FEDERATION = "[Bridge] Sorry, PMs are disabled on " +
  "this bridge over federation.";
  +const KICK_RETRY_DELAY_MS = 15000;
  +
  function MatrixHandler(ircBridge) {
  this.ircBridge = ircBridge;
  // maintain a list of room IDs which are being processed invite-wise. This is
  @@ -853,9 +855,32 @@ MatrixHandler.prototype._onJoin = Promise.coroutine(function*(req, event, user)
  }
  // get the virtual IRC user for this user
  promises.push(Promise.coroutine(function*() {
  - let bridgedClient = yield self.ircBridge.getBridgedClient(
  + let bridgedClient;
  + let kickUser = false;
  + try {
  + bridgedClient = yield self.ircBridge.getBridgedClient(
  room.server, user.getId(), (event.content || {}).displayname
  );
  + } catch (e) {
  + // We need to kick on failure to get a client.
  + req.log.info(`${user.getId()} failed to get a IRC connection. Kicking from room.`);
  + kickUser = true;
  +
  + }
  +
  + const intent = this.ircBridge.getAppServiceBridge().getIntent();
  + while (kickUser) {
  + try {
  + yield intent.kick(
  + event.room_id, user.getId(),
  + `Connection limit has been reached for ${room.server.domain}. Please try again later.`
  + );
  + break;
  + } catch (err) {
  + req.log.warn(`User was not kicked. Retrying in ${KICK_RETRY_DELAY_MS}ms. ${err}`);
  + yield Promise.delay(KICK_RETRY_DELAY_MS);
  + }
  + }
  // Check for a displayname change and update nick accordingly.
  if (event.content.displayname !== bridgedClient.displayName) {
  