for(String channel : new Channels().getChans()) {
client.write(channel);
}
client.flush();
ResponseQueue responseQueue = new ResponseQueue(client);
responseQueue.start();
//Start the bot
String serverMessage;
while((serverMessage = server.readLine()) != null) {
irc.setIrcSocketEvent(serverMessage);
if(ircMonitor.isRunning()) {
if(ircMonitor.getResponse() != null) {
responseQueue.add(ircMonitor.getResponse());
}
}
else {
responseQueue.setRunning(false);
client.write(ircMonitor.getSocketReturnMessage());
client.flush();
ircSocket.close();
break;
}