diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Backend.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Backend.cs index 8251f0eb1..2e2e2f0e4 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Backend.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Backend.cs @@ -65,10 +65,6 @@ internal static class Backend { ArgumentNullException.ThrowIfNull(inventoryRemoved); ArgumentException.ThrowIfNullOrEmpty(previousInventoryChecksum); - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - Uri request = new(ArchiNet.URL, "/Api/Listing/AnnounceDiff/v2"); AnnouncementDiffRequest data = new(ASF.GlobalDatabase?.Identifier ?? Guid.NewGuid(), steamID, inventory, inventoryChecksum, acceptedMatchableTypes, totalInventoryCount, matchEverything, ASF.GlobalConfig?.MaxTradeHoldDuration ?? GlobalConfig.DefaultMaxTradeHoldDuration, tradeToken, inventoryRemoved, previousInventoryChecksum, nickname, avatarHash); @@ -100,10 +96,6 @@ internal static class Backend { throw new ArgumentOutOfRangeException(nameof(tradeToken)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - Uri request = new(ArchiNet.URL, "/Api/Listing/Announce/v5"); AnnouncementRequest data = new(ASF.GlobalDatabase?.Identifier ?? Guid.NewGuid(), steamID, inventory, inventoryChecksum, acceptedMatchableTypes, totalInventoryCount, matchEverything, ASF.GlobalConfig?.MaxTradeHoldDuration ?? GlobalConfig.DefaultMaxTradeHoldDuration, tradeToken, nickname, avatarHash); @@ -135,10 +127,6 @@ internal static class Backend { throw new ArgumentNullException(nameof(acceptedMatchableTypes)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - Uri request = new(ArchiNet.URL, "/Api/Listing/Inventories/v2"); Dictionary headers = new(1, StringComparer.Ordinal) { @@ -171,10 +159,6 @@ internal static class Backend { throw new ArgumentNullException(nameof(realAppIDs)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - Uri request = new(ArchiNet.URL, "/Api/SetParts/Request"); SetPartsRequest data = new(ASF.GlobalDatabase?.Identifier ?? Guid.NewGuid(), steamID, matchableTypes, realAppIDs); @@ -186,10 +170,6 @@ internal static class Backend { ArgumentNullException.ThrowIfNull(bot); ArgumentNullException.ThrowIfNull(webBrowser); - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - Uri request = new(ArchiNet.URL, "/Api/Listing/HeartBeat"); HeartBeatRequest data = new(ASF.GlobalDatabase?.Identifier ?? Guid.NewGuid(), bot.SteamID); diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs index afe944202..a19b3700a 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs @@ -66,10 +66,6 @@ internal sealed class ItemsMatcherPlugin : OfficialPlugin, IBot, IBotCommand2, I throw new ArgumentOutOfRangeException(nameof(steamID)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - return await Commands.OnBotCommand(bot, access, args, steamID).ConfigureAwait(false); } @@ -94,10 +90,6 @@ internal sealed class ItemsMatcherPlugin : OfficialPlugin, IBot, IBotCommand2, I await remoteCommunication.DisposeAsync().ConfigureAwait(false); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return; - } - remoteCommunication = new RemoteCommunication(bot); if (!RemoteCommunications.TryAdd(bot, remoteCommunication)) { @@ -140,12 +132,6 @@ internal sealed class ItemsMatcherPlugin : OfficialPlugin, IBot, IBotCommand2, I } public override Task OnLoaded() { - if (SharedInfo.BuildInfo.IsCustomBuild) { - ASF.ArchiLogger.LogGenericWarning(Strings.PluginDisabledCustomBuild); - - return Task.CompletedTask; - } - Utilities.WarnAboutIncompleteTranslation(Strings.ResourceManager); return Task.CompletedTask; diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.Designer.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.Designer.cs index cd05e10c3..d22ca609d 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.Designer.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.Designer.cs @@ -74,11 +74,5 @@ namespace ArchiSteamFarm.OfficialPlugins.ItemsMatcher.Localization { return ResourceManager.GetString("ActivelyMatchingSomeConfirmationsFailed", resourceCulture); } } - - internal static string PluginDisabledCustomBuild { - get { - return ResourceManager.GetString("PluginDisabledCustomBuild", resourceCulture); - } - } } } diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.resx b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.resx index ab8d0a680..50f62b98e 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.resx +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization/Strings.resx @@ -82,7 +82,4 @@ Some confirmations have failed, approximately {0} out of {1} trades were sent successfully. {0} will be replaced by amount of the trade offers that succeeded (number), {1} will be replaced by amount of the trade offers that were supposed to be sent in total (number) - - ItemsMatcherPlugin is not supported in custom ASF builds, the functionality is disabled. - diff --git a/ArchiSteamFarm/Core/ArchiNet.cs b/ArchiSteamFarm/Core/ArchiNet.cs index 0466c1865..e410174c5 100644 --- a/ArchiSteamFarm/Core/ArchiNet.cs +++ b/ArchiSteamFarm/Core/ArchiNet.cs @@ -51,10 +51,6 @@ internal static class ArchiNet { throw new InvalidOperationException(nameof(ASF.WebBrowser)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - Uri request = new(URL, $"/Api/Checksum/{version}/{variant}"); ObjectResponse>? response = await ASF.WebBrowser.UrlGetToJsonObject>(request, cancellationToken: cancellationToken).ConfigureAwait(false); @@ -71,10 +67,6 @@ internal static class ArchiNet { throw new ArgumentOutOfRangeException(nameof(steamID)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return null; - } - (_, IReadOnlyCollection? badBots) = await CachedBadBots.GetValue(ECacheFallback.FailedNow, cancellationToken).ConfigureAwait(false); return badBots?.Contains(steamID); @@ -84,7 +76,7 @@ internal static class ArchiNet { ArgumentNullException.ThrowIfNull(bot); ArgumentNullException.ThrowIfNull(webBrowser); - if (!bot.IsConnectedAndLoggedOn || SharedInfo.BuildInfo.IsCustomBuild) { + if (!bot.IsConnectedAndLoggedOn) { return null; } @@ -188,10 +180,6 @@ internal static class ArchiNet { throw new InvalidOperationException(nameof(ASF.WebBrowser)); } - if (SharedInfo.BuildInfo.IsCustomBuild) { - return (false, null); - } - Uri request = new(URL, "/Api/BadBots"); ObjectResponse>>? response = await ASF.WebBrowser.UrlGetToJsonObject>>(request, cancellationToken: cancellationToken).ConfigureAwait(false);