From e2194894ce1a36533bd6418be6540f186e526c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Tue, 10 Jun 2025 11:07:37 +0200 Subject: [PATCH] Reset temporary account credentials upon turning off bot for wrong ones --- ArchiSteamFarm/Steam/Bot.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ArchiSteamFarm/Steam/Bot.cs b/ArchiSteamFarm/Steam/Bot.cs index fdd7fb08b..fad8942da 100644 --- a/ArchiSteamFarm/Steam/Bot.cs +++ b/ArchiSteamFarm/Steam/Bot.cs @@ -2254,6 +2254,22 @@ public sealed class Bot : IAsyncDisposable, IDisposable { // Likely permanently wrong account credentials LoginFailures = 0; + // Reset temporary login credentials, as user used wrong ones most likely, allow them to fix their mistake if they start the bot again + if (!BotConfig.IsSteamLoginSet) { + BotConfig.SteamLogin = null; + BotConfig.IsSteamLoginSet = false; + } + + if (!BotConfig.IsSteamPasswordSet) { + BotConfig.SteamPassword = null; + BotConfig.IsSteamPasswordSet = false; + } + + if (!BotConfig.IsSteamParentalCodeSet) { + BotConfig.SteamParentalCode = null; + BotConfig.IsSteamParentalCodeSet = false; + } + ArchiLogger.LogGenericError(Strings.FormatBotInvalidPasswordDuringLogin(MaxLoginFailures)); await Stop().ConfigureAwait(false);