Raised This Month: $ Target: $400
 0% 

Chat Filter v0.4 (2/27)


Post New Thread Reply   
 
Thread Tools Display Modes
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:
    27 
    Plugin Description:
    Configurable chat filter for amusement and censoring.
    Unapprover:
    Reason for Unapproving:
    Multiple errors reported.
    Old 05-21-2008 , 14: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, 3348 views)
    File Type: cfg plugin.chatfilter.cfg (493 Bytes, 3110 views)
    File Type: cfg chatfilter.cfg (3.4 KB, 3646 views)
    File Type: sp Get Plugin or Get Source (chatfilter.sp - 3632 views - 19.2 KB)
    File Type: smx chatfilter.smx (16.0 KB, 1543 views)

    Last edited by chundo; 02-27-2009 at 11:33. Reason: typo
    chundo is offline
    Noobtastic
    Member
    Join Date: Nov 2007
    Old 05-21-2008 , 22:48   Re: Chat Filter v0.1
    Reply With Quote #2

    This is so awesome, I'm not going to install it right now because I neeeeeeed to sleeeeeeep. But just reading through the config made me laugh, great stuff.

    Going to try this asap.
    Noobtastic is offline
    FunTF2Server
    Veteran Member
    Join Date: Apr 2008
    Old 05-22-2008 , 00:41   Re: Chat Filter v0.1
    Reply With Quote #3

    plugin works great.

    for the lulz, I made it for anyone who says 'mccain' gets replaced with 'senile old man', anyone who says 'hillary' gets replaced with 'a bitch' and anyone who says 'obama' gets replaced with 'a negro'

    then i went into my server when it was full and asked everyone who they were voting for president.

    epic lulz ensued.

    when one guy's chat got replaced to 'negro' after he said 'obama', I called him a racist, I said "omg rasist!!!!" and he was like "omg no I'm not the stupid thing replaced me"

    so I then said in the chat "obama" and it didn't replace mine because I'm admin and I have admin replace set to 0. haha. And then everyone called him a racist and he left the server
    __________________
    FunTF2Server is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 05-22-2008 , 01:07   Re: Chat Filter v0.1
    Reply With Quote #4

    Thats always a good thing to do.
    __________________

    DontWannaName is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 05-22-2008 , 01:08   Re: Chat Filter v0.1
    Reply With Quote #5

    Quote:
    Originally Posted by FunTF2Server View Post
    plugin works great.

    for the lulz, I made it for anyone who says 'mccain' gets replaced with 'senile old man', anyone who says 'hillary' gets replaced with 'a bitch' and anyone who says 'obama' gets replaced with 'a negro'

    then i went into my server when it was full and asked everyone who they were voting for president.

    epic lulz ensued.

    when one guy's chat got replaced to 'negro' after he said 'obama', I called him a racist, I said "omg rasist!!!!" and he was like "omg no I'm not the stupid thing replaced me"

    so I then said in the chat "obama" and it didn't replace mine because I'm admin and I have admin replace set to 0. haha. And then everyone called him a racist and he left the server

    How can I be like you?
    bl4nk is offline
    FunTF2Server
    Veteran Member
    Join Date: Apr 2008
    Old 05-22-2008 , 05:41   Re: Chat Filter v0.1
    Reply With Quote #6

    more funs, i set it for anyone who says:
    "sup"
    "hey"
    "hello"
    "omg"

    gets replaced with:
    "how does i get this semens of my face?!"
    "plz let me touch you gonad"
    "call me i likes gay secks 1-320-720-3933" (my ex-gf's number)
    "plz why does my peness get harded"

    LMAO FOr The lULZ!

    this will make a good april 1st mod for my server when it's april 1st, i will totally punk everyone
    __________________

    Last edited by FunTF2Server; 05-22-2008 at 05:44.
    FunTF2Server is offline
    chundo
    Senior Member
    Join Date: May 2008
    Old 05-22-2008 , 12:20   Re: Chat Filter v0.1
    Reply With Quote #7

    And you get repeat visitors to your server?
    chundo is offline
    FunTF2Server
    Veteran Member
    Join Date: Apr 2008
    Old 05-22-2008 , 17:26   Re: Chat Filter v0.1
    Reply With Quote #8

    Quote:
    Originally Posted by chundo View Post
    And you get repeat visitors to your server?
    well no my server is usually empty, im trying to figure out why, its because it keeps crashing all the time
    __________________
    FunTF2Server is offline
    chundo
    Senior Member
    Join Date: May 2008
    Old 05-22-2008 , 18:50   Re: Chat Filter v0.1
    Reply With Quote #9

    Quote:
    Originally Posted by FunTF2Server View Post
    well no my server is usually empty, im trying to figure out why, its because it keeps crashing all the time
    It may be related to calling your users racists. Just a wild guess.

    Just to be clear to everyone else, the purpose of this plugin isn't to insult or offend innocent users, it's to turn the actual jerks into a source of amusement.

    Last edited by chundo; 05-22-2008 at 18:56.
    chundo is offline
    FunTF2Server
    Veteran Member
    Join Date: Apr 2008
    Old 05-22-2008 , 20:01   Re: Chat Filter v0.1
    Reply With Quote #10

    Quote:
    Originally Posted by chundo View Post
    It may be related to calling your users racists. Just a wild guess.

    Just to be clear to everyone else, the purpose of this plugin isn't to insult or offend innocent users, it's to turn the actual jerks into a source of amusement.
    well people need to lighten up and learn to take a joke
    __________________
    FunTF2Server is offline
    Reply


    Thread Tools
    Display Modes

    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 18:06.


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