mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 11:37:01 +00:00
增加设置项MaxLoginAttempts(默认3)
This commit is contained in:
@@ -58,6 +58,18 @@ namespace CMLeonOS.Commands
|
||||
Console.WriteLine("Error: LoggerEnabled must be 'true' or 'false'");
|
||||
}
|
||||
}
|
||||
else if (key.ToLower() == "maxloginattempts")
|
||||
{
|
||||
if (int.TryParse(value, out int attempts) && attempts > 0)
|
||||
{
|
||||
SettingsManager.MaxLoginAttempts = attempts;
|
||||
Console.WriteLine($"MaxLoginAttempts set to {attempts}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Error: MaxLoginAttempts must be a positive integer");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SettingsManager.SetSetting(key, value);
|
||||
|
||||
Reference in New Issue
Block a user