From 97affa7b543783e8762cc6ffc8b46262f74eda5d Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 18 May 2016 02:25:31 +0200 Subject: [PATCH] Closes #229 --- ArchiSteamFarm/Bot.cs | 2 +- ArchiSteamFarm/Program.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 4f708e22d..a8accf653 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -1198,7 +1198,7 @@ namespace ArchiSteamFarm { return null; } - await Program.CheckForUpdate().ConfigureAwait(false); + await Program.CheckForUpdate(true).ConfigureAwait(false); return "Done!"; } diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 3c30ffb96..bd67b6115 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -85,7 +85,7 @@ namespace ArchiSteamFarm { private static EMode Mode = EMode.Normal; private static WebBrowser WebBrowser; - internal static async Task CheckForUpdate() { + internal static async Task CheckForUpdate(bool updateOverride) { string oldExeFile = ExecutableFile + ".old"; // We booted successfully so we can now remove old exe file @@ -163,7 +163,7 @@ namespace ArchiSteamFarm { Logging.LogGenericInfo("ASF will automatically check for new versions every 24 hours"); AutoUpdatesTimer = new Timer( - async e => await CheckForUpdate().ConfigureAwait(false), + async e => await CheckForUpdate(false).ConfigureAwait(false), null, TimeSpan.FromDays(1), // Delay TimeSpan.FromDays(1) // Period @@ -172,7 +172,7 @@ namespace ArchiSteamFarm { return; } - if (!GlobalConfig.AutoUpdates) { + if (!updateOverride && !GlobalConfig.AutoUpdates) { Logging.LogGenericInfo("New version is available!"); Logging.LogGenericInfo("Consider updating yourself!"); await Utilities.SleepAsync(5000).ConfigureAwait(false); @@ -485,7 +485,7 @@ namespace ArchiSteamFarm { Exit(1); } - CheckForUpdate().Wait(); + CheckForUpdate(false).Wait(); // Before attempting to connect, initialize our list of CMs Bot.RefreshCMs(GlobalDatabase.CellID).Wait();