Add ChatFilter2, OverheadChat, EventGreeting and update several plugins
New plugins: ChatFilter2, OverheadChat, EventGreeting. Updated: HostnameManager, Leader3 (chat and markers), NameFilter2 (plugin and config), PlayerRankings_nohlstats (rank display modes), custom-chatcolors (plugin and ccc.inc), Extend (sm_settimeleft). Add shared includes the plugins build against: Break, ChatFilter2, Couch, EventNotifier, TransmitManager, leader, ripext, unloze_playtime.
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#if defined _ChatFilter2_included_
|
||||
#endinput
|
||||
#endif
|
||||
#define _ChatFilter2_included_
|
||||
|
||||
/**
|
||||
* Censors bad words in a string the same way safe chat does, with every category.
|
||||
*
|
||||
* @param text String to censor in place
|
||||
* @param maxlen Size of text
|
||||
* @return True if anything was censored
|
||||
*/
|
||||
native bool ChatFilter2_CensorText(char[] text, int maxlen);
|
||||
|
||||
/**
|
||||
* Checks if a client has safe chat enabled.
|
||||
*
|
||||
* @param client Client index
|
||||
* @return True if safe chat is enabled
|
||||
*/
|
||||
native bool ChatFilter2_IsSafeChatEnabled(int client);
|
||||
|
||||
/**
|
||||
* Called when a client toggles safe chat, and when their cookies load with safe chat enabled.
|
||||
*
|
||||
* @param client Client index
|
||||
* @param enabled True if safe chat is now enabled
|
||||
*/
|
||||
forward void ChatFilter2_OnSafeChatChanged(int client, bool enabled);
|
||||
|
||||
#if !defined CHATFILTER2_CORE
|
||||
public SharedPlugin __pl_ChatFilter2 =
|
||||
{
|
||||
name = "ChatFilter2",
|
||||
file = "ChatFilter2.smx",
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1,
|
||||
#else
|
||||
required = 0,
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public void __pl_ChatFilter2_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("ChatFilter2_CensorText");
|
||||
MarkNativeAsOptional("ChatFilter2_IsSafeChatEnabled");
|
||||
}
|
||||
#endif
|
||||
#endif // CHATFILTER2_CORE
|
||||
Reference in New Issue
Block a user