Update basecommands.cs

This commit is contained in:
Dawid Bepierszcz
2026-01-27 12:20:29 +01:00
committed by GitHub
parent 4c43f14c82
commit 4599f08fd7

View File

@@ -507,21 +507,21 @@ public partial class CS2_SimpleAdmin
var adminsFile = await File.ReadAllTextAsync(Instance.ModuleDirectory + "/data/admins.json");
var groupsFile = await File.ReadAllTextAsync(Instance.ModuleDirectory + "/data/groups.json");
await Server.NextWorldUpdateAsync(() =>
await Server.NextWorldUpdateAsync(() =>
{
AddTimer(1, () =>
{
if (!string.IsNullOrEmpty(adminsFile))
AdminManager.LoadAdminData(ModuleDirectory + "/data/admins.json");
AddTimer(2.0f, () => AdminManager.LoadAdminData(ModuleDirectory + "/data/admins.json"));
if (!string.IsNullOrEmpty(groupsFile))
AdminManager.LoadAdminGroups(ModuleDirectory + "/data/groups.json");
AddTimer(3.0f, () => AdminManager.LoadAdminGroups(ModuleDirectory + "/data/groups.json"));
if (!string.IsNullOrEmpty(adminsFile))
AdminManager.LoadAdminData(ModuleDirectory + "/data/admins.json");
AddTimer(4.0f, () => AdminManager.LoadAdminData(ModuleDirectory + "/data/admins.json"));
_logger?.LogInformation("Loaded admins!");
});
});
});
});
//_ = _adminManager.GiveAllGroupsFlags();
//_ = _adminManager.GiveAllFlags();