diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 437cf59b1..2c775bd27 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -98,7 +98,6 @@ namespace ArchiSteamFarm { [JsonProperty] internal bool KeepRunning { get; private set; } - private Timer AcceptConfirmationsTimer; private string AuthCode; private Timer ConnectionFailureTimer; private Timer FamilySharingInactivityTimer; @@ -241,7 +240,6 @@ namespace ArchiSteamFarm { Trading.Dispose(); // Those are objects that might be null and the check should be in-place - AcceptConfirmationsTimer?.Dispose(); ConnectionFailureTimer?.Dispose(); FamilySharingInactivityTimer?.Dispose(); SendItemsTimer?.Dispose(); @@ -425,25 +423,6 @@ namespace ArchiSteamFarm { CardsFarmer.SetInitialState(BotConfig.Paused); - if (BotConfig.AcceptConfirmationsPeriod > 0) { - TimeSpan delay = TimeSpan.FromMinutes(BotConfig.AcceptConfirmationsPeriod) + TimeSpan.FromMinutes(0.2 * Bots.Count); - TimeSpan period = TimeSpan.FromMinutes(BotConfig.AcceptConfirmationsPeriod); - - if (AcceptConfirmationsTimer == null) { - AcceptConfirmationsTimer = new Timer( - async e => await AcceptConfirmations(true).ConfigureAwait(false), - null, - delay, // Delay - period // Period - ); - } else { - AcceptConfirmationsTimer.Change(delay, period); - } - } else if (AcceptConfirmationsTimer != null) { - AcceptConfirmationsTimer.Dispose(); - AcceptConfirmationsTimer = null; - } - if ((BotConfig.SendTradePeriod > 0) && (BotConfig.SteamMasterID != 0)) { TimeSpan delay = TimeSpan.FromHours(BotConfig.SendTradePeriod) + TimeSpan.FromMinutes(Bots.Count); TimeSpan period = TimeSpan.FromHours(BotConfig.SendTradePeriod); diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/BotConfig.cs index 2ec845c89..98835dedc 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/BotConfig.cs @@ -36,9 +36,6 @@ namespace ArchiSteamFarm { [SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")] [SuppressMessage("ReSharper", "ConvertToConstant.Global")] internal sealed class BotConfig { - [JsonProperty(Required = Required.DisallowNull)] - internal readonly byte AcceptConfirmationsPeriod = 0; - [JsonProperty(Required = Required.DisallowNull)] internal readonly bool AcceptGifts = false; diff --git a/ArchiSteamFarm/config/example.json b/ArchiSteamFarm/config/example.json index 9c3968364..29d43bc50 100644 --- a/ArchiSteamFarm/config/example.json +++ b/ArchiSteamFarm/config/example.json @@ -1,5 +1,4 @@ { - "AcceptConfirmationsPeriod": 0, "AcceptGifts": false, "CardDropsRestricted": true, "CustomGamePlayedWhileFarming": null, diff --git a/ConfigGenerator/BotConfig.cs b/ConfigGenerator/BotConfig.cs index f68fb6802..21154a3c5 100644 --- a/ConfigGenerator/BotConfig.cs +++ b/ConfigGenerator/BotConfig.cs @@ -37,10 +37,6 @@ namespace ConfigGenerator { [SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] [SuppressMessage("ReSharper", "UnusedMember.Global")] internal sealed class BotConfig : ASFConfig { - [LocalizedCategory("Advanced")] - [JsonProperty(Required = Required.DisallowNull)] - public byte AcceptConfirmationsPeriod { get; set; } = 0; - [JsonProperty(Required = Required.DisallowNull)] public bool AcceptGifts { get; set; } = false;