@@ -0,0 +1,1208 @@
+package heufybot.modules;%0A%0Aimport heufybot.utils.StringUtils;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class Choose extends Module%0A%7B%0A%09public Choose()%0A%09%7B%0A%09%09this.authType = Module.AuthType.Anyone;%0A%09%09this.trigger = %22%5E%22 + commandPrefix + %22(choose)($%7C .*)%22;%0A%09%7D%0A%09%0A%09@Override%0A%09public void processEvent(String source, String message, String triggerUser, List%3CString%3E params) %0A%09%7B%0A%09%09if (params.size() == 1)%0A%09%09%7B%0A%09%09%09bot.getIRC().cmdPRIVMSG(source, %22Choose what?%22);%0A%09%09%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09params.remove(0);%0A%09%09%09List%3CString%3E choices;%0A%09%09%09%0A%09%09%09if(message.contains(%22,%22))%0A%09%09%09%7B%0A%09%09%09%09choices = StringUtils.parseStringtoList(StringUtils.join(params, %22 %22), %22,%22);%0A%09%09%09%7D%0A%09%09%09else if(message.contains(%22 %22))%0A%09%09%09%7B%0A%09%09%09%09choices = params;%0A%09%09%09%7D%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09choices = new ArrayList%3CString%3E();%0A%09%09%09%09choices.add(params.get(0));%0A%09%09%09%7D%0A%09%09%09%0A%09%09%09int choiceNumber = (int) (Math.random() * choices.size());%0A%09%09%09bot.getIRC().cmdPRIVMSG(source, %22Choice: %22 + choices.get(choiceNumber));%0A%09%09%7D%0A%09%7D%0A%0A%09public String getHelp()%0A%09%7B%0A%09%09return %22Commands: %22 + commandPrefix + %22choose %3Cchoice1%3E, %3Cchoice2%3E %7C Makes the bot choose one of the given options at random.%22;%0A%09%7D%0A%0A%09@Override%0A%09public void onLoad() %0A%09%7B%0A%09%7D%0A%0A%09@Override%0A%09public void onUnload()%0A%09%7B%0A%09%7D%0A%7D%0A

Add a Choose module