mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-05 00:20:08 +00:00
Misc correction
This commit is contained in:
@@ -683,7 +683,7 @@ namespace ArchiSteamFarm {
|
||||
return (false, null);
|
||||
}
|
||||
|
||||
if ((steamParentalCode != null) && (steamParentalCode.Length > 4)) {
|
||||
if ((steamParentalCode != null) && (steamParentalCode.Length == BotConfig.SteamParentalCodeLength)) {
|
||||
byte i = 0;
|
||||
byte[] password = new byte[steamParentalCode.Length];
|
||||
|
||||
|
||||
@@ -2429,7 +2429,7 @@ namespace ArchiSteamFarm {
|
||||
} else {
|
||||
string steamParentalCode = await Logging.GetUserInput(ASF.EUserInputType.SteamParentalCode, BotName).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(steamParentalCode) || (steamParentalCode.Length != 4)) {
|
||||
if (string.IsNullOrEmpty(steamParentalCode) || (steamParentalCode.Length != BotConfig.SteamParentalCodeLength)) {
|
||||
Stop();
|
||||
|
||||
break;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user