Never register bots with broken databases as available for use

This commit is contained in:
JustArchi
2016-11-12 14:10:49 +01:00
parent e36704748a
commit 4855f890ba

View File

@@ -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 {