docs: function getServer(client, type, server, port, cb) {
      var serverType    = type || 'chat';
      var serverAddress = server || null;
      var serverPort    = port || 443;
  
      if (serverAddress === null) {
          var serverTypes = ['chat', 'events', 'groups'];
          if (serverTypes.indexOf(serverType) === -1) {
              serverType = 'chat';
          }
  
          var serverPortsChat = [80, 443, 6667];
          var serverPorts     = [80, 443];
          if (serverType === 'chat' && serverPortsChat.indexOf(serverPort) === -1) {
              serverPort = 443;
          } else if (serverType !== 'chat' && serverPorts.indexOf(serverPort) === -1) {
              serverPort = 443;
          }
  
          function findServer(cb) {
              function scan() {
                  var serverAddr = serverList[serverType][serverPort][Math.floor(Math.random() * (serverList[serverType][serverPort].length))];
                  if (unavailable.indexOf(serverAddr) >= 0) {
                      scan();
                  } else {
                      probeServer(serverAddr, serverPort, function (err, available) {
                          if (!available || err) {
                              unavailable.push(serverAddr);
                              if (unavailable.length > serverList[serverType][serverPort].length-1) {
                                  unavailable = [];
                                  setTimeout(function(){
                                      if (!client.connected) { scan(); }
                                  }, 60000);
                              } else {
                                  return scan();
                              }
                          } else {
                              unavailable = [];
                              return cb(serverAddr);
                          }
                      });
                  }
              }
              scan();
          }
  
          client.logger.info('Searching for a Twitch server..');
          findServer(function(server) {
              if (server) {
                  cb(server + ':' + serverPort);
              }
          });
      }
      return cb(serverAddress + ':' + serverPort);
  }