From ec697c2681d561b652692f42a95c4ae9c4617d4d Mon Sep 17 00:00:00 2001 From: JustArchi Date: Tue, 31 Jan 2017 22:27:16 +0100 Subject: [PATCH] Remove obsolete commands --- ArchiSteamFarm/Bot.cs | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index d3587c0b9..a71d04118 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -546,12 +546,8 @@ namespace ArchiSteamFarm { return ResponseResume(steamID); case "!RESTART": return ResponseRestart(steamID); - case "!STARTALL": - return ResponseStartAll(steamID); case "!STATUS": return ResponseStatus(steamID); - case "!STATUSALL": - return ResponseStatusAll(steamID); case "!STOP": return ResponseStop(steamID); case "!UPDATE": @@ -2629,23 +2625,6 @@ namespace ArchiSteamFarm { return responses.Count > 0 ? string.Join("", responses) : null; } - private static string ResponseStartAll(ulong steamID) { - if (steamID == 0) { - ASF.ArchiLogger.LogNullError(nameof(steamID)); - return null; - } - - if (!IsOwner(steamID)) { - return null; - } - - foreach (Bot bot in Bots.Values.Where(bot => !bot.KeepRunning)) { - bot.ResponseStart(steamID); - } - - return Environment.NewLine + Strings.Done; - } - private string ResponseStatus(ulong steamID) { if (steamID == 0) { ArchiLogger.LogNullError(nameof(steamID)); @@ -2715,22 +2694,6 @@ namespace ArchiSteamFarm { return responses.Count > 0 ? string.Join("", responses) : null; } - private static string ResponseStatusAll(ulong steamID) { - if (steamID == 0) { - ASF.ArchiLogger.LogNullError(nameof(steamID)); - return null; - } - - if (!IsOwner(steamID)) { - return null; - } - - HashSet botsRunning = new HashSet(Bots.Where(bot => bot.Value.KeepRunning).OrderBy(bot => bot.Key).Select(bot => bot.Value)); - IEnumerable statuses = botsRunning.Select(bot => bot.ResponseStatus(steamID)); - - return string.Join("", statuses) + Environment.NewLine + string.Format(Strings.BotsStatusOverview, botsRunning.Count, Bots.Count, botsRunning.Sum(bot => bot.CardsFarmer.GamesToFarm.Count), botsRunning.Sum(bot => bot.CardsFarmer.GamesToFarm.Sum(game => game.CardsRemaining))); - } - private string ResponseStop(ulong steamID) { if (steamID == 0) { ArchiLogger.LogNullError(nameof(steamID));