From b2312375546d1e5e3cb967af3cf90555ffed228e Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 18 Mar 2019 21:44:26 +0100 Subject: [PATCH] Closes #1151 Apparently `Compare()` doesn't return -1/0/1 as expected from a comparer, but some kind of string distance, which is not what we wanted here. --- ArchiSteamFarm/Commands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Commands.cs b/ArchiSteamFarm/Commands.cs index a07f29b66..cfb46f10d 100644 --- a/ArchiSteamFarm/Commands.cs +++ b/ArchiSteamFarm/Commands.cs @@ -2127,7 +2127,7 @@ namespace ArchiSteamFarm { while (!string.IsNullOrEmpty(key)) { string startingKey = key; - using (IEnumerator botsEnumerator = Bot.Bots.Where(bot => (bot.Value != Bot) && !rateLimitedBots.Contains(bot.Value) && bot.Value.IsConnectedAndLoggedOn && bot.Value.Commands.Bot.HasPermission(steamID, BotConfig.EPermission.Operator)).OrderByDescending(bot => Bot.BotsComparer.Compare(bot.Key, Bot.BotName)).ThenBy(bot => bot.Key, Bot.BotsComparer).Select(bot => bot.Value).GetEnumerator()) { + using (IEnumerator botsEnumerator = Bot.Bots.Where(bot => (bot.Value != Bot) && !rateLimitedBots.Contains(bot.Value) && bot.Value.IsConnectedAndLoggedOn && bot.Value.Commands.Bot.HasPermission(steamID, BotConfig.EPermission.Operator)).OrderByDescending(bot => Bot.BotsComparer.Compare(bot.Key, Bot.BotName) > 0).ThenBy(bot => bot.Key, Bot.BotsComparer).Select(bot => bot.Value).GetEnumerator()) { Bot currentBot = Bot; while (!string.IsNullOrEmpty(key) && (currentBot != null)) {