Browse Source

Added checks in cleaning routine not to remove the system account

tags/3.0.0
Teknikode 1 year ago
parent
commit
8859cbf0d5
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      ServerMaint/Program.cs

+ 3
- 3
ServerMaint/Program.cs View File

@@ -509,14 +509,14 @@ Thank you for your continued use of Teknik!
foreach (User user in curUsers)
{
// If the username is reserved, let's add it to the list
if (UserHelper.UsernameReserved(config, user.Username))
if (UserHelper.UsernameReserved(config, user.Username) && user.Username != Constants.SERVERUSER)
{
foundUsers.Add(user.Username);
continue;
}

// If the username is invalid, let's add it to the list
if (!UserHelper.ValidUsername(config, user.Username) && user.Username != "Server Admin")
if (!UserHelper.ValidUsername(config, user.Username) && user.Username != Constants.SERVERUSER)
{
foundUsers.Add(user.Username);
continue;
@@ -532,7 +532,7 @@ Thank you for your continued use of Teknik!
foreach (User user in curUsers)
{
// If the username is reserved, don't worry about it
if (UserHelper.UsernameReserved(config, user.Username))
if (UserHelper.UsernameReserved(config, user.Username) || user.Username == Constants.SERVERUSER)
{
continue;
}

Loading…
Cancel
Save