From 53ec07a7f102656a503e62ccd5ed2f9edb996e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Tue, 26 Mar 2024 01:15:17 +0100 Subject: [PATCH] Correct plugin names we distribute outselves --- .../ExamplePlugin.cs | 2 +- .../PeriodicGCPlugin.cs | 2 +- .../AssemblyInfo.cs | 8 ++++---- .../Data/SignInWithSteamRequest.cs | 8 ++++---- .../Data/SignInWithSteamResponse.cs | 8 ++++---- .../SignInWithSteamController.cs | 8 ++++---- .../SignInWithSteamPlugin.cs | 10 +++++----- .../ItemsMatcherPlugin.cs | 2 +- .../MobileAuthenticatorPlugin.cs | 2 +- .../MonitoringPlugin.cs | 2 +- ArchiSteamFarm/Localization/Strings.resx | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs index aed406a322864..027979fa4bfc4 100644 --- a/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.ExamplePlugin/ExamplePlugin.cs @@ -50,7 +50,7 @@ internal sealed class ExamplePlugin : IASF, IBot, IBotCommand2, IBotConnection, // Please note that this property can have direct dependencies only on structures that were initialized by the constructor, as it's possible to be called before OnLoaded() takes place [JsonInclude] [Required] - public string Name => nameof(ExamplePlugin); + public string Name => typeof(ExamplePlugin).Assembly.GetName().Name ?? throw new InvalidOperationException(nameof(Name)); // This will be displayed to the user and written in the log file, typically you should point it to the version of your library, but alternatively you can do some more advanced logic if you'd like to // Please note that this property can have direct dependencies only on structures that were initialized by the constructor, as it's possible to be called before OnLoaded() takes place diff --git a/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs b/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs index 863c0f7c33fbd..cea7ad517d44f 100644 --- a/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.PeriodicGC/PeriodicGCPlugin.cs @@ -44,7 +44,7 @@ internal sealed class PeriodicGCPlugin : IPlugin { [JsonInclude] [Required] - public string Name => nameof(PeriodicGCPlugin); + public string Name => typeof(PeriodicGCPlugin).Assembly.GetName().Name ?? throw new InvalidOperationException(nameof(Name)); [JsonInclude] [Required] diff --git a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/AssemblyInfo.cs b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/AssemblyInfo.cs index 9ca9a6b2d1ce7..370dc67801587 100644 --- a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/AssemblyInfo.cs +++ b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/AssemblyInfo.cs @@ -5,16 +5,16 @@ // / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | | // /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_| // ---------------------------------------------------------------------------------------------- -// +// | // Copyright 2015-2024 Łukasz "JustArchi" Domeradzki // Contact: JustArchi@JustArchi.net -// +// | // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// | // http://www.apache.org/licenses/LICENSE-2.0 -// +// | // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamRequest.cs b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamRequest.cs index b2038551736bd..4d23003b75502 100644 --- a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamRequest.cs +++ b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamRequest.cs @@ -5,16 +5,16 @@ // / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | | // /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_| // ---------------------------------------------------------------------------------------------- -// +// | // Copyright 2015-2024 Łukasz "JustArchi" Domeradzki // Contact: JustArchi@JustArchi.net -// +// | // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// | // http://www.apache.org/licenses/LICENSE-2.0 -// +// | // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamResponse.cs b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamResponse.cs index 788f268aff605..11c9b03459736 100644 --- a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamResponse.cs +++ b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/Data/SignInWithSteamResponse.cs @@ -5,16 +5,16 @@ // / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | | // /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_| // ---------------------------------------------------------------------------------------------- -// +// | // Copyright 2015-2024 Łukasz "JustArchi" Domeradzki // Contact: JustArchi@JustArchi.net -// +// | // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// | // http://www.apache.org/licenses/LICENSE-2.0 -// +// | // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs index bff5f076535b0..480376637ae51 100644 --- a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs +++ b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs @@ -5,16 +5,16 @@ // / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | | // /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_| // ---------------------------------------------------------------------------------------------- -// +// | // Copyright 2015-2024 Łukasz "JustArchi" Domeradzki // Contact: JustArchi@JustArchi.net -// +// | // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// | // http://www.apache.org/licenses/LICENSE-2.0 -// +// | // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamPlugin.cs b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamPlugin.cs index 0faa5f01298c2..ecbff8c5e0ebe 100644 --- a/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamPlugin.cs +++ b/ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamPlugin.cs @@ -5,16 +5,16 @@ // / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | | // /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_| // ---------------------------------------------------------------------------------------------- -// +// | // Copyright 2015-2024 Łukasz "JustArchi" Domeradzki // Contact: JustArchi@JustArchi.net -// +// | // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// | // http://www.apache.org/licenses/LICENSE-2.0 -// +// | // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,7 +37,7 @@ namespace ArchiSteamFarm.CustomPlugins.SignInWithSteam; internal sealed class SignInWithSteamPlugin : IPlugin { [JsonInclude] [Required] - public string Name => nameof(SignInWithSteamPlugin); + public string Name => typeof(SignInWithSteamPlugin).Assembly.GetName().Name ?? throw new InvalidOperationException(nameof(Name)); [JsonInclude] [Required] diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs index 680ece5c7fc79..c4cf5af985bc6 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/ItemsMatcherPlugin.cs @@ -48,7 +48,7 @@ internal sealed class ItemsMatcherPlugin : OfficialPlugin, IBot, IBotCommand2, I [JsonInclude] [Required] - public override string Name => nameof(ItemsMatcherPlugin); + public override string Name => typeof(ItemsMatcherPlugin).Assembly.GetName().Name ?? throw new InvalidOperationException(nameof(Name)); [JsonInclude] [Required] diff --git a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs index d8f720d085d39..bd9a1da35d9c8 100644 --- a/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/MobileAuthenticatorPlugin.cs @@ -43,7 +43,7 @@ namespace ArchiSteamFarm.OfficialPlugins.MobileAuthenticator; internal sealed class MobileAuthenticatorPlugin : OfficialPlugin, IBotCommand2, IBotSteamClient { [JsonInclude] [Required] - public override string Name => nameof(MobileAuthenticatorPlugin); + public override string Name => typeof(MobileAuthenticatorPlugin).Assembly.GetName().Name ?? throw new InvalidOperationException(nameof(Name)); [JsonInclude] [Required] diff --git a/ArchiSteamFarm.OfficialPlugins.Monitoring/MonitoringPlugin.cs b/ArchiSteamFarm.OfficialPlugins.Monitoring/MonitoringPlugin.cs index d64caf32f2244..6ee393030a49f 100644 --- a/ArchiSteamFarm.OfficialPlugins.Monitoring/MonitoringPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.Monitoring/MonitoringPlugin.cs @@ -54,7 +54,7 @@ internal sealed class MonitoringPlugin : OfficialPlugin, IWebServiceProvider, IG [JsonInclude] [Required] - public override string Name => nameof(MonitoringPlugin); + public override string Name => typeof(MonitoringPlugin).Assembly.GetName().Name ?? throw new InvalidOperationException(nameof(Name)); public string RepositoryName => SharedInfo.GithubRepo; diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx index 7056a2682b6fb..dc581dbb482a1 100644 --- a/ArchiSteamFarm/Localization/Strings.resx +++ b/ArchiSteamFarm/Localization/Strings.resx @@ -808,7 +808,7 @@ Process uptime: {1} {0} will be replaced by plugin name (string), {1} will be replaced by plugin assembly name (string). - {0}/{1} plugin has been disabled from automatic updates, despite supporting such feature. + {0} ({1}) plugin has been disabled from automatic updates, despite supporting such feature. {0} will be replaced by plugin name (string), {1} will be replaced by plugin assembly name (string).