From fe6a5140ec4383afe8a4c0696a6fed503e1becd8 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 23 Feb 2019 08:46:10 +0100 Subject: [PATCH] Misc --- ArchiSteamFarm/ASF.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ArchiSteamFarm/ASF.cs b/ArchiSteamFarm/ASF.cs index 107e7e152..53e2e35dd 100644 --- a/ArchiSteamFarm/ASF.cs +++ b/ArchiSteamFarm/ASF.cs @@ -92,7 +92,7 @@ namespace ArchiSteamFarm { await ArchiKestrel.Start().ConfigureAwait(false); } - await RegisterBots(botsComparer).ConfigureAwait(false); + await RegisterBots().ConfigureAwait(false); InitEvents(); } @@ -550,13 +550,7 @@ namespace ArchiSteamFarm { await OnCreatedFile(e.Name, e.FullPath).ConfigureAwait(false); } - private static async Task RegisterBots(StringComparer botsComparer) { - if (botsComparer == null) { - ArchiLogger.LogNullError(nameof(botsComparer)); - - return; - } - + private static async Task RegisterBots() { if (Bot.Bots.Count > 0) { return; } @@ -581,7 +575,7 @@ namespace ArchiSteamFarm { HashSet botNames; try { - botNames = Directory.EnumerateFiles(SharedInfo.ConfigDirectory, "*" + SharedInfo.ConfigExtension).Select(Path.GetFileNameWithoutExtension).Where(botName => !string.IsNullOrEmpty(botName) && IsValidBotName(botName)).ToHashSet(botsComparer); + botNames = Directory.EnumerateFiles(SharedInfo.ConfigDirectory, "*" + SharedInfo.ConfigExtension).Select(Path.GetFileNameWithoutExtension).Where(botName => !string.IsNullOrEmpty(botName) && IsValidBotName(botName)).ToHashSet(Bot.BotsComparer); } catch (Exception e) { ArchiLogger.LogGenericException(e);