@@ -0,0 +1,1864 @@
+package heufybot.modules;%0A%0Aimport java.text.DateFormat;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Calendar;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Apublic class Uptime extends Module%0A%7B%0A%09private Date dateStarted;%0A%09%0A%09public Uptime()%0A%09%7B%0A%09%09this.authType = AuthType.Anyone;%0A%09%09this.trigger = %22%5E%22 + commandPrefix + %22(uptime)$%22;%0A%09%7D%0A%0A%09public void processEvent(String source, String message, String triggerUser, List%3CString%3E params)%0A%09%7B%0A%09%09DateFormat format = new SimpleDateFormat(%22MM-dd-yyyy HH:mm (zz)%22);%0A%09%09%09%0A%09%09Calendar start = Calendar.getInstance();%0A%09%09start.setTime(dateStarted);%0A%09%09Calendar end = Calendar.getInstance();%0A%09%09end.setTime(new Date());%0A%09%09%0A%09%09Integer%5B%5D elapsed = new Integer%5B3%5D;%0A%09%09Calendar clone = (Calendar) start.clone(); // Otherwise changes are been reflected.%0A%09%09elapsed%5B0%5D = elapsed(clone, end, Calendar.DATE);%0A%09%09clone.add(Calendar.DATE, elapsed%5B0%5D);%0A%09%09elapsed%5B1%5D = (int) (end.getTimeInMillis() - clone.getTimeInMillis()) / 3600000;%0A%09%09clone.add(Calendar.HOUR, elapsed%5B1%5D);%0A%09%09elapsed%5B2%5D = (int) (end.getTimeInMillis() - clone.getTimeInMillis()) / 60000;%0A%09%09clone.add(Calendar.MINUTE, elapsed%5B2%5D);%0A%09%09%0A%09%09bot.getIRC().cmdPRIVMSG(source, %22Bot has been running since %22 + format.format(dateStarted) + %22 (%22 + elapsed%5B0%5D + %22 day(s), %22 + elapsed%5B1%5D + %22 hour(s) and %22 + elapsed%5B2%5D + %22 minute(s))%22);%0A%09%7D%0A%0A%09@Override%0A%09public String getHelp() %0A%09%7B%0A%09%09return %22Commands: %22 + commandPrefix + %22uptime %7C Shows how long the bot has been running.%22;%0A%09%7D%0A%09%0A%09@Override%0A%09public void onLoad()%0A%09%7B%0A%09%09dateStarted = new Date();%0A%09%7D%0A%0A%09@Override%0A%09public void onUnload()%0A%09%7B%0A%09%7D%0A%09%0A%09private int elapsed(Calendar before, Calendar after, int field) %0A%09%7B%0A%09    Calendar clone = (Calendar) before.clone(); // Otherwise changes are been reflected.%0A%09    int elapsed = -1;%0A%09    while (!clone.after(after)) %7B%0A%09        clone.add(field, 1);%0A%09        elapsed++;%0A%09    %7D%0A%09    return elapsed;%0A%09%7D%0A%7D%0A

Add an Uptime module