Admin immunity + Discord

- Fixed command logging + small refactor
- Fixed admin immunity
- Separated penalty webhook
- More customizable penalty webhook
This commit is contained in:
Dawid Bepierszcz
2024-08-05 03:28:42 +02:00
parent bb0a236f28
commit c4cb308147
12 changed files with 222 additions and 250 deletions

View File

@@ -44,9 +44,7 @@ public partial class CS2_SimpleAdmin
return;
}
}
_getIpTryCount = 0;
var address = $"{ipAddress}:{ConVar.Find("hostport")?.GetPrimitiveValue<int>()}";
var hostname = ConVar.Find("hostname")!.StringValue;
@@ -106,6 +104,8 @@ public partial class CS2_SimpleAdmin
}
});
});
_getIpTryCount = 0;
}
[GameEventHandler]
@@ -370,11 +370,17 @@ public partial class CS2_SimpleAdmin
return HookResult.Handled;
}
public void OnMapStart(string mapName)
private void OnMapStart(string mapName)
{
if (Config.ReloadAdminsEveryMapChange && _serverLoaded && ServerId != null)
AddTimer(3.0f, () => ReloadAdmins(null));
AddTimer(34, () =>
{
if (!_serverLoaded)
OnGameServerSteamAPIActivated();
});
var path = Path.GetDirectoryName(ModuleDirectory);
if (Directory.Exists(path + "/CS2-Tags"))
{