2021-07-07 13:36:25 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace CoopServer
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
2021-12-08 13:45:00 +01:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-08 13:45:00 +01:00
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|