diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index b607d376e..8f47cda41 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -1723,7 +1723,7 @@ namespace ArchiSteamFarm { Regex regex = new Regex(@"[^\u0000-\u007F]+", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - string username = regex.Replace(BotConfig.SteamLogin, "").Trim(); + string username = regex.Replace(BotConfig.SteamLogin, "").Replace(" ", ""); string password = BotConfig.SteamPassword; if (!string.IsNullOrEmpty(password)) { diff --git a/ArchiSteamFarm/CardsFarmer.cs b/ArchiSteamFarm/CardsFarmer.cs index 222a9ec84..3abb4160c 100755 --- a/ArchiSteamFarm/CardsFarmer.cs +++ b/ArchiSteamFarm/CardsFarmer.cs @@ -756,11 +756,11 @@ namespace ArchiSteamFarm { return false; } - CurrentGamesFarming.UnionWith(games); + CurrentGamesFarming.ReplaceWith(games); - Bot.ArchiLogger.LogGenericInfo(string.Format(Strings.NowIdlingList, string.Join(", ", CurrentGamesFarming.Select(game => game.AppID)))); + Bot.ArchiLogger.LogGenericInfo(string.Format(Strings.NowIdlingList, string.Join(", ", games.Select(game => game.AppID)))); - bool result = await FarmHours(CurrentGamesFarming).ConfigureAwait(false); + bool result = await FarmHours(games).ConfigureAwait(false); CurrentGamesFarming.Clear(); return result; } diff --git a/ArchiSteamFarm/ConcurrentHashSet.cs b/ArchiSteamFarm/ConcurrentHashSet.cs index 73bd8a4c9..37d2faa49 100644 --- a/ArchiSteamFarm/ConcurrentHashSet.cs +++ b/ArchiSteamFarm/ConcurrentHashSet.cs @@ -113,7 +113,7 @@ namespace ArchiSteamFarm { return true; } - private void ReplaceWith(IEnumerable other) { + internal void ReplaceWith(IEnumerable other) { BackingCollection.Clear(); foreach (T item in other) { BackingCollection[item] = true;