- Changed PawnIsAlive to LifeState
- Changed AdminCache - now it only removes flags added in the database - not all assigned to player
- Added config variable `IgnoredIps` to ignore ip check on connect, useful when proxying
This commit is contained in:
Dawid Bepierszcz
2025-03-25 11:39:00 +01:00
parent 888d6b0152
commit b6c876d709
13 changed files with 134 additions and 70 deletions

View File

@@ -145,7 +145,7 @@ internal class BanManager(Database.Database? database)
{
string sql;
if (CS2_SimpleAdmin.Instance.Config.OtherSettings.CheckMultiAccountsByIp)
if (CS2_SimpleAdmin.Instance.Config.OtherSettings.CheckMultiAccountsByIp && !CS2_SimpleAdmin.Instance.Config.OtherSettings.IgnoredIps.Contains(player.IpAddress))
{
sql = CS2_SimpleAdmin.Instance.Config.MultiServerMode ? """
SELECT COALESCE((
@@ -232,7 +232,8 @@ internal class BanManager(Database.Database? database)
{
PlayerSteamID = player.SteamId.SteamId64.ToString(),
PlayerIP = CS2_SimpleAdmin.Instance.Config.OtherSettings.BanType == 0 ||
string.IsNullOrEmpty(player.IpAddress)
string.IsNullOrEmpty(player.IpAddress) ||
CS2_SimpleAdmin.Instance.Config.OtherSettings.IgnoredIps.Contains(player.IpAddress)
? null
: player.IpAddress,
PlayerName = !string.IsNullOrEmpty(player.Name) ? player.Name : string.Empty,