using fCraft; void OnPlayerChat(Player player, ref string message, HandledEventArgs e) { if (player.CheckSpam(ref message)) { player.Message("&WDo not spam!"); } }
using fCraft; void OnPlayerChat(Player player, ref string message, HandledEventArgs e) { if (player.CheckSpam(ref message) && message.Contains("www.") || message.Contains("http://")) { player.Ban("Advertising"); } }These code examples demonstrate the use of the Player DetectChatSpam feature in fCraft for detecting spam and preventing undesirable behavior in the chat. The fCraft API documentation provides further details on the various methods and properties available for using this feature. The package library for fCraft is likely to be a game server software library.