-- player_chat_profanity - Player filtering of messages based on profanity settings -- (component of Chat System) -- Template attachment: player (dynamically via Chat System) -- Created by: Patrick Ferland -- Created on: 05/27/2008 -- Revision History -- 05/27/2008 P.Ferland - New script -- 05/30/2008 P.Ferland - Initial release -- 06/02/2008 P.Ferland - Cleanup and documentation -- Constants -- no constants -- Script Properties Define Properties() chat_system_profanity_filter = 1 PersistProperty('chat_system_profanity_filter') IncludeScript('11302:12') -- chat_utility IncludeScript('11302:8') -- chat_profanity end -- Commands -- no commands -- Triggers -- Preprocess chat message. Filter profanity (if desired) at this time Trigger chat_system_message_pre(message, channel, sender, command) local profanity = 0 local w = GetWorld() if (w.chat_system.chat_system_profanity_filter_user_change == 1) then profanity = self.chat_system_profanity_filter else profanity = w.chat_system.chat_system_profanity_filter end if (profanity == 1) then if (self.chat_system_current_message == '') then self.chat_system_current_message = chat_system_profanity_nice(message) end end SendTo(self, 'chat_system_message_pre_done', 0, message, channel, sender, command) end