Stage 2 of deprecation for IsBotAccount, --server and --service

This commit is contained in:
JustArchi
2018-05-13 20:59:05 +02:00
parent a7df090225
commit 2357729ca4
2 changed files with 12 additions and 19 deletions

View File

@@ -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