mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
AntiDLL Module Fix
Fixed banning when detecting a forbidden event
This commit is contained in:
parent
62b1987fde
commit
5d62c743dd
5 changed files with 45 additions and 35 deletions
|
|
@ -491,7 +491,7 @@ internal static class Helper
|
|||
public static void SendDiscordPenaltyMessage(CCSPlayerController? caller, CCSPlayerController? target, string reason, int duration, PenaltyType penalty, IStringLocalizer? localizer)
|
||||
{
|
||||
if (localizer == null) return;
|
||||
|
||||
|
||||
var penaltySetting = penalty switch
|
||||
{
|
||||
PenaltyType.Ban => CS2_SimpleAdmin.Instance.Config.Discord.DiscordPenaltyBanSettings,
|
||||
|
|
@ -505,7 +505,7 @@ internal static class Helper
|
|||
var webhookUrl = penaltySetting.FirstOrDefault(s => s.Name.Equals("Webhook"))?.Value;
|
||||
|
||||
if (string.IsNullOrEmpty(webhookUrl)) return;
|
||||
|
||||
|
||||
const string defaultCommunityUrl = "<https://steamcommunity.com/profiles/0>";
|
||||
var callerCommunityUrl = caller != null ? $"<{new SteamID(caller.SteamID).ToCommunityUrl()}>" : defaultCommunityUrl;
|
||||
var targetCommunityUrl = target != null ? $"<{new SteamID(target.SteamID).ToCommunityUrl()}>" : defaultCommunityUrl;
|
||||
|
|
@ -585,10 +585,10 @@ internal static class Helper
|
|||
});
|
||||
}
|
||||
|
||||
public static void SendDiscordPenaltyMessage(CCSPlayerController? caller, string steamId, string reason, int duration, PenaltyType penalty, IStringLocalizer? localizer)
|
||||
public static void SendDiscordPenaltyMessage(CCSPlayerController? caller, string steamId, string reason, int duration, PenaltyType penalty, IStringLocalizer? localizer)
|
||||
{
|
||||
if (localizer == null) return;
|
||||
|
||||
|
||||
var penaltySetting = penalty switch
|
||||
{
|
||||
PenaltyType.Ban => CS2_SimpleAdmin.Instance.Config.Discord.DiscordPenaltyBanSettings,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue