private void OnPlayerChat(BasePlayer player, string message, ConVar.Chat.ChatChannel channel) { if (player == null || string.IsNullOrWhiteSpace(message)) { return; } if (BetterChatMute != null && BetterChatMute.IsLoaded) { if (BetterChatMute.Call <bool>("API_IsMuted", player.IPlayer)) { return; } } message = message.Replace("@here", "here").Replace("@everyone", "everyone").Replace("*", "*"); if (channel == ConVar.Chat.ChatChannel.Global && _configData.ChatSettings.Enabled) { SendMessage(Lang("Chat", null, player.displayName.Replace("*", "*"), message), _configData.ChatSettings.WebhookURL); } if (channel == ConVar.Chat.ChatChannel.Team && _configData.ChatTeamSettings.Enabled) { SendMessage(Lang("ChatTeam", null, player.displayName.Replace("*", "*"), message), _configData.ChatTeamSettings.WebhookURL); } }
private object OnPlayerChat(BasePlayer bplayer, string message, ConVar.Chat.ChatChannel chatChannel) { IPlayer player = bplayer.IPlayer; bool isPublicMessage = chatChannel == ConVar.Chat.ChatChannel.Global;