From bfe653f2c90333c16bbf4d8656e56fbdfc88bc59 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 18 May 2017 19:40:47 +0200 Subject: [PATCH] Forward/Distribute keys only to bots where user has operator+ access > @Ryzhehvost: Archi, I was talking in #general-russian with a user today, and he told me that in multi-user configuration (part of bots have one master, other part - another), if forwarding or/and distribution is enabled, keys would be forwarded/distributed to any bot, not to the bots of same master. I took a look at code, and seems he is right. Maybe this should be fixed? Without that multi-user configuration is not very useful... --- ArchiSteamFarm/Bot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index f32057856..da8723a48 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -2932,7 +2932,7 @@ namespace ArchiSteamFarm { StringBuilder response = new StringBuilder(); using (StringReader reader = new StringReader(message)) { - using (IEnumerator enumerator = Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value).GetEnumerator()) { + using (IEnumerator enumerator = Bots.Where(bot => IsOperator(steamID)).OrderBy(bot => bot.Key).Select(bot => bot.Value).GetEnumerator()) { string key = reader.ReadLine(); Bot currentBot = this; while (!string.IsNullOrEmpty(key) && (currentBot != null)) {