From 4855f890bae15d9de1d3fd33afada9e070ac7e89 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 12 Nov 2016 14:10:49 +0100 Subject: [PATCH] Never register bots with broken databases as available for use --- ArchiSteamFarm/Bot.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 72be094a8..a7cd2567f 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -182,11 +182,6 @@ namespace ArchiSteamFarm { return; } - // Register bot as available for ASF - if (!Bots.TryAdd(botName, this)) { - throw new ArgumentException("That bot is already defined!"); - } - string botDatabaseFile = botPath + ".db"; BotDatabase = BotDatabase.Load(botDatabaseFile); @@ -195,6 +190,11 @@ namespace ArchiSteamFarm { return; } + // Register bot as available for ASF + if (!Bots.TryAdd(botName, this)) { + throw new ArgumentException("That bot is already defined!"); + } + if (BotDatabase.MobileAuthenticator != null) { BotDatabase.MobileAuthenticator.Init(this); } else {