fix: Adds server access with protected accounts (#915)

Adds a configuration file to specify protected accounts:
_Distribution/Configuration/server-access.json_
```json
{
  "newPasswordOnReset": false,
  "protectedAccounts": ["admin"]
}
```

Protected accounts are unbanned and reset to `AccessLevel.Owner` upon login.

The option `newPasswordOnReset` will create a new password for a protected account if it needs to be reset. The password is a random GUID and logged to the console.

_**Note:**_ If your player character was accidentally modified, simply make a new character to fix the old one.
This commit is contained in:
Kamron Batman 2022-01-10 23:14:55 -08:00 • committed by GitHub
parent 51169ddbb0
commit fc51b60cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 108 additions and 5 deletions

View file

@ -10,7 +10,7 @@ namespace Server.Network
{
// Delay in milliseconds
private static readonly int[] Delays = new int[0x100];
private static string ThrottlesConfiguration = "Configuration/throttles.json";
private const string ThrottlesConfiguration = "Configuration/throttles.json";
public static void Initialize()
{