diff --git a/ArchiSteamFarm/BotConfig.cs b/ArchiSteamFarm/BotConfig.cs index 2102eb6bd..36d9d14ad 100644 --- a/ArchiSteamFarm/BotConfig.cs +++ b/ArchiSteamFarm/BotConfig.cs @@ -114,19 +114,6 @@ namespace ArchiSteamFarm { [JsonProperty(Required = Required.DisallowNull)] internal readonly bool UseLoginKeys = true; - [JsonProperty(PropertyName = GlobalConfig.UlongStringPrefix + nameof(SteamMasterClanID), Required = Required.DisallowNull)] - internal string SSteamMasterClanID { - get => SteamMasterClanID.ToString(); - private set { - if (string.IsNullOrEmpty(value) || !ulong.TryParse(value, out ulong result)) { - ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SSteamMasterClanID))); - return; - } - - SteamMasterClanID = result; - } - } - [JsonProperty] internal string SteamLogin { get; set; } @@ -141,6 +128,19 @@ namespace ArchiSteamFarm { private bool ShouldSerializeSensitiveDetails = true; + [JsonProperty(PropertyName = GlobalConfig.UlongStringPrefix + nameof(SteamMasterClanID), Required = Required.DisallowNull)] + private string SSteamMasterClanID { + get => SteamMasterClanID.ToString(); + set { + if (string.IsNullOrEmpty(value) || !ulong.TryParse(value, out ulong result)) { + ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SSteamMasterClanID))); + return; + } + + SteamMasterClanID = result; + } + } + public bool ShouldSerializeSteamLogin() => ShouldSerializeSensitiveDetails; public bool ShouldSerializeSteamParentalPIN() => ShouldSerializeSensitiveDetails; public bool ShouldSerializeSteamPassword() => ShouldSerializeSensitiveDetails; diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs index 1e81eb982..aa30b8524 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/GlobalConfig.cs @@ -103,10 +103,16 @@ namespace ArchiSteamFarm { [JsonProperty] internal string IPCHost { get; set; } = "127.0.0.1"; + [JsonProperty(Required = Required.DisallowNull)] + internal ulong SteamOwnerID { get; private set; } + + [JsonProperty(Required = Required.DisallowNull)] + internal ProtocolTypes SteamProtocols { get; private set; } = ProtocolTypes.Tcp; + [JsonProperty(PropertyName = UlongStringPrefix + nameof(SteamOwnerID), Required = Required.DisallowNull)] - internal string SSteamOwnerID { + private string SSteamOwnerID { get => SteamOwnerID.ToString(); - private set { + set { if (string.IsNullOrEmpty(value) || !ulong.TryParse(value, out ulong result)) { ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SSteamOwnerID))); return; @@ -116,12 +122,6 @@ namespace ArchiSteamFarm { } } - [JsonProperty(Required = Required.DisallowNull)] - internal ulong SteamOwnerID { get; private set; } - - [JsonProperty(Required = Required.DisallowNull)] - internal ProtocolTypes SteamProtocols { get; private set; } = ProtocolTypes.Tcp; - internal static GlobalConfig Load(string filePath) { if (string.IsNullOrEmpty(filePath)) { ASF.ArchiLogger.LogNullError(nameof(filePath));