What steps will reproduce the problem?
The following code:
Configuration.Builder builder = new Configuration.Builder();
builder
.setAutoNickChange(true)
.setAutoReconnect(true)
.setCapEnabled(false)
.setIdentServerEnabled(false)
.setShutdownHookEnabled(true)
.setRealName("TestBot")
.setName("TestBot")
.setLogin("TestBot")
.setVersion("TestBot 1.0");
PircBotX bot = new PircBotX(builder.buildForServer("chat.freenode.net", 6667));
Throws an exception in the last line:
Exception in thread "main" java.lang.IllegalArgumentException: Must specify
server hostname
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:125)
at org.pircbotx.Configuration.<init>(Configuration.java:135)
at org.pircbotx.Configuration$Builder.buildConfiguration(Configuration.java:589)
at org.pircbotx.Configuration$Builder.buildForServer(Configuration.java:611)
at Main.main(Main.java:84)
What is the expected output?
That I don't need to use builder.setServer to set the server.
What version of the product are you using? On what operating system?
pircbotx 2.0.1
Original issue reported on code.google.com by FH3...@gmail.com on 7 Feb 2014 at 11:05
Original issue reported on code.google.com by
FH3...@gmail.com
on 7 Feb 2014 at 11:05