mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02:00
Merge remote-tracking branch 'upstream/main'
upstream 1.7.2b
This commit is contained in:
commit
a7cad842d3
6 changed files with 19 additions and 19 deletions
|
|
@ -171,8 +171,8 @@ internal static class Helper
|
|||
if (player == null || !player.IsValid || player.IsHLTV)
|
||||
return;
|
||||
|
||||
if (player.UserId.HasValue)
|
||||
CS2_SimpleAdmin.PlayersInfo[player.UserId.Value].WaitingForKick = true;
|
||||
if (player.UserId.HasValue && CS2_SimpleAdmin.PlayersInfo.TryGetValue(player.UserId.Value, out var value))
|
||||
value.WaitingForKick = true;
|
||||
|
||||
player.CommitSuicide(true, true);
|
||||
|
||||
|
|
@ -183,16 +183,16 @@ internal static class Helper
|
|||
if (!player.IsValid || player.IsHLTV)
|
||||
return;
|
||||
|
||||
Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
// Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
|
||||
// player.Disconnect(reason); Broken after last update
|
||||
player.Disconnect(reason);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
// Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
|
||||
// player.Disconnect(reason); // Broken after last update
|
||||
player.Disconnect(reason);
|
||||
}
|
||||
|
||||
if (CS2_SimpleAdmin.UnlockedCommands && reason == NetworkDisconnectionReason.NETWORK_DISCONNECT_REJECT_BANNED)
|
||||
|
|
@ -216,8 +216,8 @@ internal static class Helper
|
|||
if (!player.IsValid || player.IsHLTV)
|
||||
return;
|
||||
|
||||
if (player.UserId.HasValue)
|
||||
CS2_SimpleAdmin.PlayersInfo[player.UserId.Value].WaitingForKick = true;
|
||||
if (player.UserId.HasValue && CS2_SimpleAdmin.PlayersInfo.TryGetValue(player.UserId.Value, out var value))
|
||||
value.WaitingForKick = true;
|
||||
|
||||
player.CommitSuicide(true, true);
|
||||
|
||||
|
|
@ -238,15 +238,15 @@ internal static class Helper
|
|||
// }
|
||||
// }
|
||||
//
|
||||
Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
// player.Disconnect(reason); // Broken after last update
|
||||
// Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
player.Disconnect(reason);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
// Server.ExecuteCommand($"kickid {player.UserId}");
|
||||
|
||||
// player.Disconnect(reason); // Broken after last update
|
||||
player.Disconnect(reason);
|
||||
}
|
||||
|
||||
if (CS2_SimpleAdmin.UnlockedCommands && reason == NetworkDisconnectionReason.NETWORK_DISCONNECT_REJECT_BANNED)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue