I think that its to easy too create a topic for it, but quickly I made this:
}
_selectorThread.start();
}
+ static int hours=1;//1 hour
+ private static void scheduleNextRestart()
+ {
+ _log.info("Scheduled GS restart after " + hours + " hours");
+ ThreadPoolManager.getInstance().scheduleGeneral(new Restart(), hours * 3600000);
+ }
+ public static class Restart implements Runnable
+ {
+ @Override
+ public void run()
+ {
+ L2PcInstance manager = L2PcInstance.createDummyPlayer(0, "Restart Manager");
+ Shutdown.getInstance().startShutdown(manager, 900000, true);
+ manager.decayMe();
+ }
+ }
public static SelectorThread<L2GameClient> getSelectorThread()
{
return _selectorThread;
}
and
Util.printSection("Game Server");
+ scheduleNextRestart();
if (Config.IRC_ENABLED)
IrcManager.getInstance().getConnection().sendChan(Config.IRC_MSG_START);
on GamerServer.java
This should work.
PS: about that dummy pc Instance, dont flame me dat was a quick fix xD