mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-20 00:08:38 +00:00
Remove AcceptConfirmationsPeriod
This property was added when ASF 2FA existed in solo + import mode, and the purpose was automatic accept of confirmations in solo mode. Due to the fact that ASF 2FA exists only in import mode, and user should be using authenticator of his choice for all 2FA-related tasks, this properly is no longer in ASF 2FA scope, and should be removed to avoid confusion. Yet another reason for this is the fact that it actually didn't work since quite a while, together with SendTradePeriod.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"AcceptConfirmationsPeriod": 0,
|
||||
"AcceptGifts": false,
|
||||
"CardDropsRestricted": true,
|
||||
"CustomGamePlayedWhileFarming": null,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user