@@ -0,0 +1,945 @@
+package heufybot.modules;%0A%0Aimport heufybot.utils.URLUtils;%0A%0Aimport java.util.List;%0A%0Apublic class Shorten extends Module%0A%7B%0A%09public Shorten()%0A%09%7B%0A%09%09this.authType = Module.AuthType.Anyone;%0A%09%09this.trigger = %22%5E%22 + commandPrefix + %22(shorten)($%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, %22Shorten what?%22);%0A%09%09%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09String shortenedURL = URLUtils.shortenURL(params.get(1));%0A%09%09%09if(shortenedURL == null)%0A%09%09%09%7B%0A%09%09%09%09bot.getIRC().cmdPRIVMSG(source, %22%5BShorten%5D Error: URL could not be shortned%22);%0A%09%09%09%7D%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09bot.getIRC().cmdPRIVMSG(source, %22%5BShorten%5D %22 + shortenedURL);%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09public String getHelp()%0A%09%7B%0A%09%09return %22Commands: %22 + commandPrefix + %22shorten %3Curl%3E %7C Shortens the given URL using Googl.%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 URL shortening module