Misc correction

This commit is contained in:
JustArchi
2019-07-20 02:56:14 +02:00
parent 767471b5a3
commit 248f940072
3 changed files with 5 additions and 3 deletions

View File

@@ -37,6 +37,8 @@ using SteamKit2;
namespace ArchiSteamFarm {
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
public sealed class BotConfig {
internal const byte SteamParentalCodeLength = 4;
private const bool DefaultAcceptGifts = false;
private const bool DefaultAutoSteamSaleEvent = false;
private const EBotBehaviour DefaultBotBehaviour = EBotBehaviour.None;
@@ -283,7 +285,7 @@ namespace ArchiSteamFarm {
return (false, string.Format(Strings.ErrorConfigPropertyInvalid, nameof(SteamMasterClanID), SteamMasterClanID));
}
if (!string.IsNullOrEmpty(SteamParentalCode) && (SteamParentalCode != "0") && (SteamParentalCode.Length != 4)) {
if (!string.IsNullOrEmpty(SteamParentalCode) && (SteamParentalCode != "0") && (SteamParentalCode.Length != SteamParentalCodeLength)) {
return (false, string.Format(Strings.ErrorConfigPropertyInvalid, nameof(SteamParentalCode), SteamParentalCode));
}