// hackish but working approach to prevent an endless loop. Abort after 4 nick attempts.
if (nick.endsWith("----")) {
LOG.error("Unable to set nick: " + nick + " disconnecting");
} else {
LOG.warn("Unable to set nick: " + nick + " Retrying with " + nick + "-");
connection.doNick(nick);
// if the nick failure was doing startup channels weren't joined. So join
// the channels now. It's a no-op if the channels are already joined.
joinChannels();
}
}