This commit is contained in:
JustArchi
2016-08-13 04:19:20 +02:00
parent 26bd76cc4a
commit 1ec0b20604
2 changed files with 5 additions and 7 deletions

View File

@@ -40,7 +40,6 @@ using SteamKit2.Discovery;
namespace ArchiSteamFarm { namespace ArchiSteamFarm {
internal sealed class Bot : IDisposable { internal sealed class Bot : IDisposable {
private const ulong ArchiSCFarmGroup = 103582791440160998;
private const ushort CallbackSleep = 500; // In miliseconds private const ushort CallbackSleep = 500; // In miliseconds
private const ushort MaxSteamMessageLength = 2048; private const ushort MaxSteamMessageLength = 2048;
@@ -1275,16 +1274,14 @@ namespace ArchiSteamFarm {
return null; return null;
} }
string[] responses = await Task.WhenAll(Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value.ResponseOwns(steamID, query))).ConfigureAwait(false);
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
List<Task<string>> tasks = new List<Task<string>>(Bots.OrderBy(bot => bot.Key).Select(bot => bot.Value.ResponseOwns(steamID, query)));
string[] responses = await Task.WhenAll(tasks).ConfigureAwait(false);
foreach (string response in responses.Where(response => !string.IsNullOrEmpty(response))) { foreach (string response in responses.Where(response => !string.IsNullOrEmpty(response))) {
result.Append(response); result.Append(response);
} }
return result.ToString(); return result.Length != 0 ? result.ToString() : null;
} }
private async Task<string> ResponsePlay(ulong steamID, HashSet<uint> gameIDs) { private async Task<string> ResponsePlay(ulong steamID, HashSet<uint> gameIDs) {
@@ -1952,7 +1949,7 @@ namespace ArchiSteamFarm {
} }
if (Program.GlobalConfig.Statistics) { if (Program.GlobalConfig.Statistics) {
ArchiWebHandler.JoinGroup(ArchiSCFarmGroup).Forget(); ArchiWebHandler.JoinGroup(SharedInfo.ASFGroupSteamID).Forget();
} }
Trading.CheckTrades().Forget(); Trading.CheckTrades().Forget();

View File

@@ -59,6 +59,7 @@ namespace ArchiSteamFarm {
internal const string LogFile = "log.txt"; internal const string LogFile = "log.txt";
internal const ulong ArchiSteamID = 76561198006963719; internal const ulong ArchiSteamID = 76561198006963719;
internal const ulong ASFGroupSteamID = 103582791440160998;
internal const string GithubReleaseURL = "https://api.github.com/repos/" + GithubRepo + "/releases"; // GitHub API is HTTPS only internal const string GithubReleaseURL = "https://api.github.com/repos/" + GithubRepo + "/releases"; // GitHub API is HTTPS only
internal const string GlobalConfigFileName = ASF + ".json"; internal const string GlobalConfigFileName = ASF + ".json";