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...
This commit is contained in:
JustArchi
2017-05-18 19:40:47 +02:00
parent 7fb5c7beaa
commit bfe653f2c9

View File

@@ -2932,7 +2932,7 @@ namespace ArchiSteamFarm {
StringBuilder response = new StringBuilder();
using (StringReader reader = new StringReader(message)) {
using (IEnumerator<Bot> enumerator = Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value).GetEnumerator()) {
using (IEnumerator<Bot> 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)) {