mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Misc
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user