mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Stage 2 of deprecation for IsBotAccount, --server and --service
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user