mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Add better fallback for parental timeouts
This commit is contained in:
@@ -660,6 +660,10 @@ namespace ArchiSteamFarm {
|
||||
|
||||
CParental_GetParentalSettings_Response body = response.GetDeserializedResponse<CParental_GetParentalSettings_Response>();
|
||||
|
||||
if (body.settings == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!body.settings.is_enabled) {
|
||||
return (false, null);
|
||||
}
|
||||
|
||||
@@ -2036,6 +2036,7 @@ namespace ArchiSteamFarm {
|
||||
EResult lastLogOnResult = LastLogOnResult;
|
||||
LastLogOnResult = EResult.Invalid;
|
||||
ItemsCount = TradesCount = HeartBeatFailures = 0;
|
||||
SteamParentalActive = true;
|
||||
StopConnectionFailureTimer();
|
||||
StopPlayingWasBlockedTimer();
|
||||
|
||||
@@ -2440,6 +2441,16 @@ namespace ArchiSteamFarm {
|
||||
} else {
|
||||
SteamParentalActive = false;
|
||||
}
|
||||
} else if (SteamParentalActive && !string.IsNullOrEmpty(BotConfig.SteamParentalCode) && (BotConfig.SteamParentalCode.Length != BotConfig.SteamParentalCodeLength)) {
|
||||
string steamParentalCode = await Logging.GetUserInput(ASF.EUserInputType.SteamParentalCode, BotName).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(steamParentalCode) || (steamParentalCode.Length != BotConfig.SteamParentalCodeLength)) {
|
||||
Stop();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
SetUserInput(ASF.EUserInputType.SteamParentalCode, steamParentalCode);
|
||||
}
|
||||
|
||||
ArchiWebHandler.OnVanityURLChanged(callback.VanityURL);
|
||||
|
||||
Reference in New Issue
Block a user