mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Add more support for SDA
This commit is contained in:
@@ -186,7 +186,7 @@ namespace ArchiSteamFarm {
|
||||
File.Delete(botPath + ".maFile");
|
||||
Logging.LogGenericInfo("Success!", botName);
|
||||
} catch (Exception e) {
|
||||
Logging.LogGenericException(e);
|
||||
Logging.LogGenericException(e, botName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1168,6 +1168,19 @@ namespace ArchiSteamFarm {
|
||||
Program.GlobalDatabase.CellID = callback.CellID;
|
||||
}
|
||||
|
||||
// Support and convert SDA files
|
||||
ulong steamID = callback.ClientSteamID;
|
||||
if (BotDatabase.SteamGuardAccount == null && File.Exists(steamID + ".maFile")) {
|
||||
Logging.LogGenericInfo("Converting SDA .maFile into ASF format...", BotName);
|
||||
try {
|
||||
BotDatabase.SteamGuardAccount = JsonConvert.DeserializeObject<SteamGuardAccount>(File.ReadAllText(steamID + ".maFile"));
|
||||
File.Delete(steamID + ".maFile");
|
||||
Logging.LogGenericInfo("Success!", BotName);
|
||||
} catch (Exception e) {
|
||||
Logging.LogGenericException(e, BotName);
|
||||
}
|
||||
}
|
||||
|
||||
if (BotConfig.UseAsfAsMobileAuthenticator && TwoFactorAuth == null && BotDatabase.SteamGuardAccount == null) {
|
||||
LinkMobileAuthenticator();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user