RAGECOOP-V/Server/Program.cs

39 lines
942 B
C#
Raw Normal View History

2021-07-07 13:36:25 +02:00
using System;
using System.IO;
namespace CoopServer
{
class Program
{
public static bool ReadyToStop = false;
2021-07-07 13:36:25 +02:00
static void Main(string[] args)
{
try
{
2021-07-12 09:24:31 +02:00
Console.Title = "GTACOOP:R Server";
2021-07-07 13:36:25 +02:00
if (File.Exists("log.txt"))
{
File.WriteAllText("log.txt", string.Empty);
}
Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e)
{
if (e.SpecialKey == ConsoleSpecialKey.ControlC)
{
e.Cancel = true;
ReadyToStop = true;
}
};
2021-07-07 13:36:25 +02:00
_ = new Server();
}
catch (Exception e)
{
Logging.Error(e.ToString());
Console.ReadLine();
}
}
}
}