mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02: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:
parent
c25d3c4bda
commit
9fb256d39f
9 changed files with 165 additions and 139 deletions
|
|
@ -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 }
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue