Raised This Month: $ Target: $400
 0% 

Chat Filter v0.4 (2/27)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
chundo
Senior Member
Join Date: May 2008
Plugin ID:
386
Plugin Version:
0.4
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    26 
    Plugin Description:
    Configurable chat filter for amusement and censoring.
    Unapprover:
    Reason for Unapproving:
    Multiple errors reported.
    Old 05-21-2008 , 13:54   Chat Filter v0.4 (2/27)
    Reply With Quote #1

    Chat Filter v0.4 (2/27)

    NOTE: VERSION 0.3 REQUIRES SOURCEMOD 1.1!

    Chat Filter is a configurable chat text filter that I created after looking for a more flexible and entertaining version of swear_replacement.

    Features:

    Chat Filter operates in three modes - replace the entire message with another phrase, censor just the keyword with another word/phrase, or block the message entirely (similar to other censor plugins). Where Chat Filter excels is its configurability:
    1. Keywords and replacements can be grouped together, so you can create context-specific replacements. For example, you could set it to replace any anti-gay comments with "I quite enjoyed the locker room scenes in Top Gun."
    2. Keywords can trigger other actions in addition to the normal replacement/blocking. For example, users can be automatically kicked, banned, set on fire, etc. when they trigger certain keywords.
    3. Chat Filter adds a fun "word of the day" mode, where any user that types the word in chat gets a configurable command executed on them.
    The original goal of this plugin was as much to provide amusement for players/admins as to block offensive messages, but it is also a very effective chat censor.

    Configuration:

    See the attached chatfilter.cfg for a configuration example. Note that when operating in mode 1, the "replace" value will replace the entire message, whereas in mode 2 the replace value will only replace the offending word. If no replacement values are specified, "****" will be used.

    CVars:

    sm_chatfilter_version - Plugin version.
    sm_chatfilter_enable - 1 is on, 0 is off. (default 1)
    sm_chatfilter_mode - 1 for replace, 2 for censor, 3 for block. (default 1)
    sm_chatfilter_admins - Set to 1 to filter admin chat as well. (default 0)
    sm_chatfilter_names - Set to 1 to filter player names as well. (default 0)
    sm_chatfilter_limit - Maximum number of offenses before an additional action is taken on a player. 0 for off. (default 0)
    sm_chatfilter_limit_action - The action to take on a player when they reach the repeat offender limit. This can be any SourceMod admin command ("sm_" prefix optional) that takes a user parameter. (default "gag")

    Commands:

    sm_chatfilter_setwordoftheday <phrase> <optional:action> <optional:replace>

    Changes the "word of the day" (requires a section in chatfilter.cfg called "wordoftheday"). When a user uses this word in chat, the specified action will be executed on them, and their message will be replaced with the specified text.

    sm_chatfilter_deletewordoftheday

    Deletes the current word of the day.

    Installing:

    chatfilter.smx -> addons/sourcemod/plugins/
    chatfilter.sp -> addons/sourcemod/scripting/
    chatfilter.cfg -> addons/sourcemod/configs/
    chatfilter.phrases.txt -> addons/sourcemod/translations/
    plugin.chatfilter.cfg (auto-created) -> cfg/sourcemod/

    Changelog:

    0.1 - Initial release
    0.2 - Fixed case-insensitive replacements
    - Fixed chat duplication in CS:S
    - Added word-only replacement
    0.3 - Fixed name replacement for all Orange Box games (using SM 1.1's SetClientInfo()). Due to how name change rate limits work in OB, if the user tries to change their name back to what it originally was, ChatFilter will not be able to change it again for awhile. Due to this issue, if you are concerned about offensive names, it is highly recommended that you set "sm_chatfilter_limit" to something other than 0, and "sm_chatfilter_limit_action" to "kick", which will result in them being kicked almost immediately if they revert to their original offensive name.
    0.4 - Various array-length related fixes.

    Credits:

    Thanks to Hell Phoenix for his Swear Replacement plugin, which I borrowed a few ideas and pieces of code from.
    Attached Files
    File Type: txt chatfilter.phrases.txt (194 Bytes, 3388 views)
    File Type: cfg plugin.chatfilter.cfg (493 Bytes, 3141 views)
    File Type: cfg chatfilter.cfg (3.4 KB, 3689 views)
    File Type: sp Get Plugin or Get Source (chatfilter.sp - 3718 views - 19.2 KB)
    File Type: smx chatfilter.smx (16.0 KB, 1610 views)

    Last edited by chundo; 02-27-2009 at 10:33. Reason: typo
    chundo is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 21:51.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode