edited css_say logging

This commit is contained in:
AiDN™ 2024-02-01 13:14:19 +01:00 • committed by GitHub
parent 4e597d73a5
commit f15061793a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1968,10 +1968,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
sb.Append(_localizer!["sa_adminsay_prefix", utf8String]);
Server.PrintToChatAll(sb.ToString());
if (Config.DiscordWebhook.Length > 0 && _localizer != null)
{
LocalizedString localizedMessage = _localizer["sa_adminsay_prefix", utf8String];
_ = SendWebhookMessage(localizedMessage.ToString().Replace("", "").Replace("", ""));
}
_ = SendWebhookMessage($"ASAY: {caller!.PlayerName}: {utf8String}");
}
[ConsoleCommand("css_psay", "Private message a player.")]
@ -2232,4 +2229,4 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
var response = await httpClient.PostAsync(Config.DiscordWebhook, content);
}
}
}
}