Support SDA files

This commit is contained in:
JustArchi
2016-03-07 15:42:38 +01:00
parent ac9943ff94
commit 09abe77495

View File

@@ -178,6 +178,18 @@ namespace ArchiSteamFarm {
BotDatabase = BotDatabase.Load(botPath + ".db");
SentryFile = botPath + ".bin";
// Support and convert SDA files
if (BotDatabase.SteamGuardAccount == null && File.Exists(botPath + ".maFile")) {
Logging.LogGenericInfo("Converting SDA .maFile into ASF format...", botName);
try {
BotDatabase.SteamGuardAccount = JsonConvert.DeserializeObject<SteamGuardAccount>(File.ReadAllText(botPath + ".maFile"));
File.Delete(botPath + ".maFile");
Logging.LogGenericInfo("Success!", botName);
} catch (Exception e) {
Logging.LogGenericException(e);
}
}
// Initialize
SteamClient = new SteamClient();