diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 2c00b630f..1894b8be8 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -439,16 +439,33 @@ namespace ArchiSteamFarm { } internal static string ResponseStatus(string botName) { + Bot bot; + string result=""; if (string.IsNullOrEmpty(botName)) { return null; + } else { + if (botName.Equals("all")) { + foreach (var curbot in Bots) { + if (curbot.Value.CardsFarmer.CurrentGamesFarming.Count == 0) + result+="Bot " + curbot.Key + " is not farming.\n"; + else + result+="Bot " + curbot.Key + " is currently farming appIDs: " + string.Join(", ", curbot.Value.CardsFarmer.CurrentGamesFarming) + " and has a total of " + curbot.Value.CardsFarmer.GamesToFarm.Count + " games left to farm.\n"; + } + result+="Currently " + Bots.Count + " bots are running."; + return result; } - Bot bot; if (!Bots.TryGetValue(botName, out bot)) { - return "Couldn't find any bot named " + botName + "!"; + result+="Couldn't find any bot named " + botName + "!"; + return result; + } } - return "Bot " + bot.BotName + " is currently farming appIDs: " + string.Join(", ", bot.CardsFarmer.CurrentGamesFarming) + " and has a total of " + bot.CardsFarmer.GamesToFarm.Count + " games left to farm"; + if (bot.CardsFarmer.CurrentGamesFarming.Count > 0) { + result+="Bot " + bot.BotName + " is currently farming appIDs: " + string.Join(", ", bot.CardsFarmer.CurrentGamesFarming) + " and has a total of " + bot.CardsFarmer.GamesToFarm.Count + " games left to farm.\n"; + } + result+="Currently " + Bots.Count + " bots are running"; + return result; } internal static string Response2FA(string botName) { diff --git a/ArchiSteamFarm/WCF.cs b/ArchiSteamFarm/WCF.cs index ea83a8ca9..1468f6e81 100644 --- a/ArchiSteamFarm/WCF.cs +++ b/ArchiSteamFarm/WCF.cs @@ -84,6 +84,7 @@ namespace ArchiSteamFarm { Logging.LogGenericInfo("WCF", "Received command: \"" + input + "\""); string command = '!' + input; + if (command.Equals("!status")) command+=" all"; //show status off all bots if no bot specified string output = bot.HandleMessage(command).Result; // TODO: This should be asynchronous Logging.LogGenericInfo("WCF", "Answered to command: \"" + input + "\" with: \"" + output + "\"");