mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-22 19:54:28 +00:00
AntiDLL Module Fix
Fixed banning when detecting a forbidden event
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user