remove excessive else

This commit is contained in:
Ryzhehvost
2016-01-10 18:50:17 +02:00
parent 0ddcf004c1
commit 5b711f158d

View File

@@ -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";
}