From 5b711f158d8e5a5ab36d6bec9a56e738bc14d7b6 Mon Sep 17 00:00:00 2001 From: Ryzhehvost Date: Sun, 10 Jan 2016 18:50:17 +0200 Subject: [PATCH] remove excessive else --- ArchiSteamFarm/Bot.cs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 1894b8be8..2b9a421ac 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -443,24 +443,23 @@ namespace ArchiSteamFarm { 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; + } + 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; } if (!Bots.TryGetValue(botName, out bot)) { result+="Couldn't find any bot named " + botName + "!"; return result; - } } - + 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"; }