mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-25 12:52:18 +00:00
1.7.7-alpha
- Fixed (@all,@team,@lifestate) spam with discord webhook - Currently `small` actions for ban optimizations
This commit is contained in:
@@ -650,7 +650,6 @@ public partial class CS2_SimpleAdmin
|
||||
Helper.LogCommand(caller, command);
|
||||
|
||||
var playersToTarget = targets.Players.Where(player => player is { IsValid: true, IsBot: false }).ToList();
|
||||
|
||||
if (playersToTarget.Count > 1)
|
||||
return;
|
||||
|
||||
@@ -708,20 +707,20 @@ public partial class CS2_SimpleAdmin
|
||||
if (caller != null)
|
||||
{
|
||||
caller.PrintToConsole("--------- PLAYER LIST ---------");
|
||||
playersToTarget.ForEach(player =>
|
||||
foreach (var player in playersToTarget)
|
||||
{
|
||||
caller.PrintToConsole(
|
||||
$"• [#{player.UserId}] \"{player.PlayerName}\" (IP Address: \"{(AdminManager.PlayerHasPermissions(new SteamID(caller.SteamID), "@css/showip") ? player.IpAddress?.Split(":")[0] : "Unknown")}\" SteamID64: \"{player.SteamID}\")");
|
||||
});
|
||||
};
|
||||
caller.PrintToConsole("--------- END PLAYER LIST ---------");
|
||||
}
|
||||
else
|
||||
{
|
||||
Server.PrintToConsole("--------- PLAYER LIST ---------");
|
||||
playersToTarget.ForEach(player =>
|
||||
foreach (var player in playersToTarget)
|
||||
{
|
||||
Server.PrintToConsole($"• [#{player.UserId}] \"{player.PlayerName}\" (IP Address: \"{player.IpAddress?.Split(":")[0]}\" SteamID64: \"{player.SteamID}\")");
|
||||
});
|
||||
};
|
||||
Server.PrintToConsole("--------- END PLAYER LIST ---------");
|
||||
}
|
||||
}
|
||||
@@ -789,6 +788,8 @@ public partial class CS2_SimpleAdmin
|
||||
Kick(caller, player, reason, callerName, command);
|
||||
}
|
||||
});
|
||||
|
||||
Helper.LogCommand(caller, command);
|
||||
}
|
||||
|
||||
public void Kick(CCSPlayerController? caller, CCSPlayerController player, string? reason = "Unknown", string? callerName = null, CommandInfo? command = null)
|
||||
@@ -828,8 +829,6 @@ public partial class CS2_SimpleAdmin
|
||||
// Log the command and send Discord notification
|
||||
if (command == null)
|
||||
Helper.LogCommand(caller, $"css_kick {(string.IsNullOrEmpty(player.PlayerName) ? player.SteamID.ToString() : player.PlayerName)} {reason}");
|
||||
else
|
||||
Helper.LogCommand(caller, command);
|
||||
|
||||
SimpleAdminApi?.OnPlayerPenaltiedEvent(playerInfo, adminInfo, PenaltyType.Kick, reason, -1, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user