Adds settings (#126)

This commit is contained in:
Kamron Batman 2020-05-02 23:41:30 -07:00 • committed by GitHub
parent 8028a85ffe
commit f336a56364
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 229 additions and 99 deletions

View file

@ -11,10 +11,18 @@ namespace Server.Misc
{
public class AccountHandler
{
private static readonly int MaxAccountsPerIP = 1;
private static readonly bool AutoAccountCreation = true;
private static readonly bool RestrictDeletion = !TestCenter.Enabled;
private static readonly TimeSpan DeleteDelay = TimeSpan.FromDays(7.0);
private static int MaxAccountsPerIP;
private static bool AutoAccountCreation;
private static bool RestrictDeletion = !TestCenter.Enabled;
private static TimeSpan DeleteDelay = TimeSpan.FromDays(7.0);
private static bool PasswordCommandEnabled;
public static void Configure()
{
MaxAccountsPerIP = ServerConfiguration.GetOrUpdateSetting("accountHandler.maxAccountsPerIP", 1);
AutoAccountCreation = ServerConfiguration.GetOrUpdateSetting("accountHandler.autoAccountCreation", true);
PasswordCommandEnabled = ServerConfiguration.GetOrUpdateSetting("accountHandler.enablePlayerPasswordCommand", false);
}
private static readonly CityInfo[] StartingCities =
{
@ -46,8 +54,6 @@ namespace Server.Misc
}
*/
private static readonly bool PasswordCommandEnabled = false;
private static Dictionary<IPAddress, int> m_IPTable;
private static readonly char[] m_ForbiddenChars =