package meew0.mewtwo.thread;

import meew0.mewtwo.MewtwoMain;
import org.pircbotx.PircBotX;

/**
 * Created by meew0 on 04.02.15.
 */
public class AutoShutdownThread implements Runnable {
    private final PircBotX bot;

    public AutoShutdownThread(PircBotX bot) {
        this.bot = bot;
    }

    @Override
    public void run() {
        MewtwoMain.mewtwoLogger.info("AutoShutdownThread starting up, automatically shutting down Mewtwo in " + MewtwoMain.autoShutdown + " seconds");

        try {
            Thread.sleep(MewtwoMain.autoShutdown * 1000);
        } catch(InterruptedException e) {
            MewtwoMain.mewtwoLogger.info("AutoShutdownThread interrupted! This is not good. Shutting down Mewtwo now");
        }

        MewtwoMain.mewtwoLogger.info("AutoShutdownThread timer ran out! Shutting down Mewtwo");
        bot.sendIRC().quitServer("Auto shutdown after " + MewtwoMain.autoShutdown + " seconds");

        MewtwoMain.mewtwoLogger.info("Quit server, now waiting 10 seconds and exiting");
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.exit(0);
    }
}

@@ -325,24 +325,177 @@
 oid run() %7B%0A
+        if(MewtwoMain.autoShutdown %3C= 0) %7B%0A            MewtwoMain.mewtwoLogger.info(%22Not starting up AutoShutdownThread%22);%0A            return;%0A        %7D%0A
         Mewt

Fix AST