mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
cleanup
This commit is contained in:
@@ -33,6 +33,7 @@ using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.Text;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal sealed class Bot {
|
||||
@@ -440,33 +441,29 @@ namespace ArchiSteamFarm {
|
||||
|
||||
internal static string ResponseStatus(string botName) {
|
||||
Bot bot;
|
||||
string result="";
|
||||
if (string.IsNullOrEmpty(botName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!Bots.TryGetValue(botName, out bot)) {
|
||||
result+="Couldn't find any bot named " + botName + "!";
|
||||
return result;
|
||||
return "Couldn't find any bot named " + botName + "!"; ;
|
||||
}
|
||||
|
||||
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";
|
||||
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.";
|
||||
} else {
|
||||
return "Bot " + bot.BotName + " is not farming.";
|
||||
|
||||
}
|
||||
result+="Currently " + Bots.Count + " bots are running";
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static string ResponseStatusAll() {
|
||||
string result = "";
|
||||
StringBuilder result = new StringBuilder();
|
||||
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.Append(ResponseStatus(curbot.Key)+Environment.NewLine);
|
||||
}
|
||||
result += "Currently " + Bots.Count + " bots are running.";
|
||||
return result;
|
||||
result.Append("Currently " + Bots.Count + " bots are running.");
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
internal static string Response2FA(string botName) {
|
||||
|
||||
Reference in New Issue
Block a user