1.7.7-alpha

- Fixed (@all,@team,@lifestate) spam with discord webhook
- Currently `small` actions for ban optimizations
This commit is contained in:
Dawid Bepierszcz 2025-05-20 23:51:59 +02:00
parent b6c876d709
commit f69f1277f8
20 changed files with 460 additions and 241 deletions

View file

@ -9,9 +9,9 @@ public class ServerManager
{
private int _getIpTryCount;
public void CheckHibernationStatus()
public static void CheckHibernationStatus()
{
ConVar? convar = ConVar.Find("sv_hibernate_when_empty");
var convar = ConVar.Find("sv_hibernate_when_empty");
if (convar == null || !convar.GetPrimitiveValue<bool>())
return;
@ -51,8 +51,6 @@ public class ServerManager
var rconPassword = ConVar.Find("rcon_password")!.StringValue;
CS2_SimpleAdmin.IpAddress = address;
CS2_SimpleAdmin._logger?.LogInformation("Loaded server with ip {ip}", ipAddress);
Task.Run(async () =>
{
try
@ -81,6 +79,8 @@ public class ServerManager
}
CS2_SimpleAdmin.ServerId = serverId;
CS2_SimpleAdmin._logger?.LogInformation("Loaded server with ip {ip}", ipAddress);
if (CS2_SimpleAdmin.ServerId != null)
{
@ -88,6 +88,8 @@ public class ServerManager
}
CS2_SimpleAdmin.ServerLoaded = true;
await CS2_SimpleAdmin.Instance.CacheManager.InitializeCacheAsync();
}
catch (Exception ex)
{