Add lockfiles to the bot

This commit is contained in:
Zontreck 2020-06-20 20:39:32 -07:00
parent f07fdec676
commit 43a87c6be0
2 changed files with 5 additions and 2 deletions

View file

@ -48,6 +48,9 @@ namespace Bot
public static unsafe void Main(string[] args)
{
if (File.Exists("Bot.lockfile")) Environment.Exit(0);
File.WriteAllText("Bot.lockfile", "1");
Console.WriteLine("Setting up Main Configuration");
Log = new Logger("BotCore5");
BotSession.Instance.Logger = Log;