2026-03-21 21:23:33 +01:00
|
|
|
|
using System.Diagnostics;
|
2025-12-19 17:54:50 +01:00
|
|
|
|
|
2026-03-22 18:31:05 +01:00
|
|
|
|
namespace ONDServer;
|
2025-12-19 17:54:50 +01:00
|
|
|
|
|
|
|
|
|
|
public class Program {
|
|
|
|
|
|
public static void Main(string[] args) {
|
2026-03-21 21:23:33 +01:00
|
|
|
|
if (args.Contains("--persistent")){
|
|
|
|
|
|
Server.AutoStop = false;
|
|
|
|
|
|
}
|
2025-12-19 17:54:50 +01:00
|
|
|
|
Server.Start(9012);
|
|
|
|
|
|
}
|
2026-03-21 21:23:33 +01:00
|
|
|
|
|
|
|
|
|
|
public static void Restart() {
|
|
|
|
|
|
Console.WriteLine("Game concluded -> restarting server");
|
|
|
|
|
|
Process.Start(new ProcessStartInfo{ FileName = Environment.ProcessPath, UseShellExecute = false });
|
|
|
|
|
|
Environment.Exit(0);
|
|
|
|
|
|
}
|
2025-12-19 17:54:50 +01:00
|
|
|
|
}
|