2014-05-19 17:48:59.254-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.PircBotX - Connected to server.
2014-05-19 17:48:59.257-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.output.OutputRaw - CAP LS
2014-05-19 17:48:59.258-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.output.OutputRaw - PASS mypass
2014-05-19 17:48:59.258-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.output.OutputRaw - NICK myname
2014-05-19 17:48:59.258-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.output.OutputRaw - USER myname 8 * :PircBotX 2.0.1, a fork of PircBot, the Java IRC bot -
pircbotx.googlecode.com2014-05-19 17:48:59.307-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.InputParser - :slackbot PRIVMSG myname : VERSION
2014-05-19 17:49:00.259-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.output.OutputRaw - JOIN #test
2014-05-19 17:49:00.267-0400 [Thread- ThreadPool - 3] ERROR org.pircbotx.PircBotX - Exception encountered when parsing line
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
at java.util.ArrayList.RangeCheck(ArrayList.java:547) ~[na:1.6.0_45]
at java.util.ArrayList.get(ArrayList.java:322) ~[na:1.6.0_45]
at org.pircbotx.ServerInfo.parse004(ServerInfo.java:115) ~[pircbotx-2.0.1.jar:na]
at org.pircbotx.ServerInfo.parse(ServerInfo.java:106) ~[pircbotx-2.0.1.jar:na]
at org.pircbotx.InputParser.processServerResponse(InputParser.java:709) ~[pircbotx-2.0.1.jar:na]
at org.pircbotx.InputParser.handleLine(InputParser.java:323) ~[pircbotx-2.0.1.jar:na]
at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:275) [pircbotx-2.0.1.jar:na]
at org.pircbotx.PircBotX.connect(PircBotX.java:236) [pircbotx-2.0.1.jar:na]
at org.pircbotx.PircBotX.startBot(PircBotX.java:151) [pircbotx-2.0.1.jar:na]
at com.blah.adapter.irc.IRCOutputAdapter.connect(IRCOutputAdapter.java:199) [java-bin/:na]
[ . . . . .]
2014-05-19 17:49:01.261-0400 [listenerPool0-thread1] INFO org.pircbotx.output.OutputRaw - NOTICE slackbot : VERSION PircBotX 2.0.1, a fork of PircBot, the Java IRC bot -
pircbotx.googlecode.com 2014-05-19 17:49:01.332-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.InputParser - :slackbot PRIVMSG myname :SSL connection required
2014-05-19 17:49:01.333-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.InputParser - 444 sbarber :SSL connection required
2014-05-19 17:49:01.350-0400 [Thread- ThreadPool - 3] INFO org.pircbotx.dcc.DccHandler - Terminating all transfers waiting to be accepted
Code:
private void connect() {
Configuration configuration = new Configuration.Builder()
.setName(getName()) //Set the nick of the bot.
//TODO: separate username and nick properties
.setLogin(getName()) //login part of hostmask, eg name:login@host
.setAutoNickChange(true) //Automatically change nick when the current one is in use
.setCapEnabled(true) //Enable CAP features
.addCapHandler(new TLSCapHandler(new UtilSSLSocketFactory().trustAllCertificates(), true))
.setServer(getServer(), getPort(), getPassword()) //TODO: handle servers that don't require a password
.addAutoJoinChannel(getTarget()) //Join the configured channel
.buildConfiguration();
try {
bot = new PircBotX(configuration);
bot.startBot();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
connected = false;
return;
} catch (IrcException e) {
// TODO Auto-generated catch block
e.printStackTrace();
connected = false;
return;
}
connected = true;
}