//Shutdown public static void ShutDown(string commandArgs) { if (commandArgs != "") { DarkLog.Normal("Shutting down - " + commandArgs); ClientHandler.SendConnectionEndToAll("Server is shutting down - " + commandArgs); } else { DarkLog.Normal("Shutting down"); ClientHandler.SendConnectionEndToAll("Server is shutting down"); } serverStarting = false; serverRunning = false; StopHTTPServer(); }
//Restart private static void Restart(string commandArgs) { if (commandArgs != "") { DarkLog.Normal("Restarting - " + commandArgs); ClientHandler.SendConnectionEndToAll("Server is restarting - " + commandArgs); } else { DarkLog.Normal("Restarting"); ClientHandler.SendConnectionEndToAll("Server is restarting"); } serverRestarting = true; serverStarting = false; serverRunning = false; ForceStopHTTPServer(); }