Пример #1
0
 public static void Shutdown(string reason)
 {
     MessageQueuer.SendConnectionEndToAll(reason);
     Thread.Sleep(250);
     ServerStarting = false;
     ServerRunning  = false;
 }
Пример #2
0
        public static async void Shutdown()
        {
            MessageQueuer.SendConnectionEndToAll("Server is shutting down");
            await Task.Delay(1000);

            ServerStarting = false;
            ServerRunning  = false;
        }
Пример #3
0
 public static void Shutdown(string reason)
 {
     LunaLog.Debug($"Shutting down with {PlayerCount} Players, " + $"{Clients.Count} connected Clients");
     MessageQueuer.SendConnectionEndToAll(reason);
     ConfigsLoaded = false;
     ServerRunning = false;
     LidgrenServer.Server.Shutdown("So long and thanks for all the fish");
 }
Пример #4
0
 public override void Execute(string commandArgs)
 {
     if (commandArgs != "")
     {
         LunaLog.Normal($"Shutting down - {commandArgs}");
         MessageQueuer.SendConnectionEndToAll($"Server is shutting down - {commandArgs}");
     }
     else
     {
         LunaLog.Normal("Shutting down");
         MessageQueuer.SendConnectionEndToAll("Server is shutting down");
     }
     ServerContext.ServerStarting = false;
     ServerContext.ServerRunning  = false;
 }
Пример #5
0
 public override void Execute(string commandArgs)
 {
     if (commandArgs != "")
     {
         LunaLog.Normal("Restarting - " + commandArgs);
         MessageQueuer.SendConnectionEndToAll("Server is restarting - " + commandArgs);
     }
     else
     {
         LunaLog.Normal("Restarting");
         MessageQueuer.SendConnectionEndToAll("Server is restarting");
     }
     ServerContext.ServerRestarting = true;
     ServerContext.ServerStarting   = false;
     ServerContext.ServerRunning    = false;
 }