diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/BotConfig.cs index 36b1e23ca..9255e87fe 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/BotConfig.cs @@ -129,19 +129,16 @@ namespace ArchiSteamFarm { [JsonProperty] internal string SteamPassword { get; set; } + private bool DeprecatedConfig; private bool ShouldSerializeSensitiveDetails = true; [JsonProperty(Required = Required.DisallowNull)] + [SuppressMessage("ReSharper", "ValueParameterNotUsed")] private bool IsBotAccount { set { // TODO: Deprecate further in the next version - ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(IsBotAccount), nameof(BotBehaviour))); - - if (value) { - BotBehaviour |= EBotBehaviour.RejectInvalidFriendInvites; - BotBehaviour |= EBotBehaviour.RejectInvalidTrades; - BotBehaviour |= EBotBehaviour.RejectInvalidGroupInvites; - } + ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningDeprecated, nameof(IsBotAccount), nameof(BotBehaviour))); + DeprecatedConfig = true; } } @@ -186,6 +183,10 @@ namespace ArchiSteamFarm { return null; } + if (botConfig.DeprecatedConfig) { + return null; + } + botConfig.ShouldSerializeSensitiveDetails = false; // Support encrypted passwords diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 05f48f693..33ed2de63 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -447,21 +447,13 @@ namespace ArchiSteamFarm { break; case "--server" when !cryptKeyNext: // TODO: Deprecate further in the next version - ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, "--server", "GlobalConfig.IPC")); - - ProcessRequired = true; - - if (GlobalConfig.IPCPrefixes.Count > 0) { - IPC.Start(GlobalConfig.IPCPrefixes); - } - + ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningDeprecated, "--server", "GlobalConfig.IPC")); + Environment.Exit(1); break; case "--service" when !cryptKeyNext: // TODO: Deprecate further in the next version - ASF.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, "--service", "--no-restart --process-required --system-required")); - RestartAllowed = false; - ProcessRequired = true; - SystemRequired = true; + ASF.ArchiLogger.LogGenericError(string.Format(Strings.WarningDeprecated, "--service", "--no-restart --process-required --system-required")); + Environment.Exit(1); break; case "--system-required" when !cryptKeyNext: SystemRequired = true;