示例#1
0
 //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();
 }
示例#2
0
 //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();
 }