mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 18:49:23 +00:00
1.4.3c
- Fixed rare problems with expiring bans - More checks for `BanType` - Minor changes about validating players - Added `css_players -duplicate` to list players with same ip address
This commit is contained in:
@@ -59,16 +59,14 @@ namespace CS2_SimpleAdmin
|
||||
|
||||
public static List<CCSPlayerController> GetValidPlayers()
|
||||
{
|
||||
return Utilities.GetPlayers().FindAll(p =>
|
||||
p.IsValid && p.SteamID.ToString().Length == 17 && !string.IsNullOrEmpty(p.IpAddress) && p is
|
||||
{ Connected: PlayerConnectedState.PlayerConnected, IsBot: false, IsHLTV: false });
|
||||
return Utilities.GetPlayers().FindAll(p => p is
|
||||
{ IsBot: false, IsHLTV: false });
|
||||
}
|
||||
|
||||
public static IEnumerable<CCSPlayerController?> GetValidPlayersWithBots()
|
||||
{
|
||||
return Utilities.GetPlayers().FindAll(p =>
|
||||
p.IsValid && p.SteamID.ToString().Length == 17 && !string.IsNullOrEmpty(p.IpAddress) && p is { Connected: PlayerConnectedState.PlayerConnected, IsBot: false, IsHLTV: false } ||
|
||||
p is { IsValid: true, Connected: PlayerConnectedState.PlayerConnected, IsBot: true, IsHLTV: false }
|
||||
p is { IsBot: false, IsHLTV: false } or { IsBot: true, IsHLTV: false }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user