Raised This Month: $32 Target: $400
 8% 

[ANY] [RU] Chat Message Filter (Censor)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
6507
Plugin Version:
1.10
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Replace obscene and offensive language in the chat and nicknames
    Old 04-09-2019 , 10:26   [ANY] [RU] Chat Message Filter (Censor)
    Reply With Quote #1

    How is it work?
    - it checks all chat messages by prepared censor list and replace unappropriate words (or part of words) by * asterisk.
    - nicknames of clients are handled as well (on connect stage), including attempt to manually rename it in-game.
    - all actions are logged to logs/chat_filter.log file.
    Abilities:
    Can handle:
    - translit
    - character multi duplication
    - some tricks, like w*o*r*d, ъ <-> ь, ё <-> е, й <-> и, 0 <-> О, 3 <-> З, _.- attempts and so.
    - supports white listing.

    Note: it doesn't use regexp.
    Compitibility:
    - L4D1
    - L4D2
    - CSGO
    - CS (untested)
    - TF2 (untested)
    Languages:
    - Russian only (hard-coded morphology handling logic).
    - BTW, you can freely add your filter words in configs/chat_filter.cfg file.
    Settings:
    in cfg/sourcemod/sm_message_filter.cfg (ConVars):

    - sm_message_filter_enable - def.: 1 - Enable plugin (1 - On / 0 - Off)
    - sm_message_filter_blocktime - def.: 15 - Time (in sec.) added to chat mute duration each time when player use offensive words (0 - to disable)
    - sm_message_filter_ignore_chat_proc - def.: 0 - Ignore chat processor and intercept 'say' command instead? (1 - Yes / 0 - No)

    in addons/sourcemod folder:

    - configs/chat_filter.cfg file - to edit the list of obscene phrases.
    - configs/chat_filter_whitelist.cfg file - to add some excludes from above rule.
    Commands:
    - sm_msgfilter_update - Populate phrases list from config
    Required:
    - GeoIP extension (included in SourceMod)
    - (optional) To preserve chat color tags it is recommended to use one of chat processors:
    Credits:
    - Keith Warren (Shaders Allen) - for user message hook examples
    Conflicts:
    - May conflict with some plugins for coloring the chat (only for censored messages).
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Files
    File Type: zip MessageFilter_v1.10.zip (26.4 KB, 336 views)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 02-17-2023 at 16:50.
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 04-09-2019 , 14:26   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #2

    Quote:
    1.1 (09-Apr-2019)
    - Added temporary lock for sending messages if player used offensive word (see "g_hCvarBlockTime" ConVar)
    - Added several rules against attempts to trick the filter
    - Fixed the case in "Chat processor" when double msg protection "eats" Name_Change message (tested in L4D1)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 04-21-2019 , 07:41   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #3

    Quote:
    1.4 (21-Apr-2019)
    - Added words whitelist (configs/chat_filter_white.cfg).
    - Added some rules against new tricks (Russian words written as a translit, multi char duplication, ...).
    - Words filter is rearranged to prevent rules duplication (added sort_order.xls macro to prepare list in correct order).
    - Added missing CloseHandle.
    - Added some Engligh bad words.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 08-25-2019 , 09:07   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #4

    Updated.
    Quote:
    1.5 (05-May-2019)
    - Do not filter root admin chat

    1.7 (25-Aug-2019)
    - Updated some rules.
    - Updated bad words.
    - Updated whitelists.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    shtopor
    Member
    Join Date: Dec 2010
    Old 03-21-2020 , 03:39   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #5

    Hi, Dragokas. Pls, fix it:

    L 03/21/2020 - 10:14:02: [SM] Exception reported: Native is not bound
    L 03/21/2020 - 10:14:02: [SM] Blaming: custom/messagefilter.smx
    L 03/21/2020 - 10:14:02: [SM] Call stack trace:
    L 03/21/2020 - 10:14:02: [SM] [0] BfReadString
    L 03/21/2020 - 10:14:02: [SM] [1] Line 309, D:\Distrib\srcds\03 Sourcemod\sourcemod-1.10.0-git6453-windows\messagefilter.sp::UserMessage_SayText 2

    Line 309\Code: BfReadString(msg, message, sizeof(message));

    Last edited by shtopor; 03-21-2020 at 03:39.
    shtopor is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-21-2020 , 04:17   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #6

    What game?
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Pala4
    Senior Member
    Join Date: Dec 2007
    Old 04-27-2020 , 01:41   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #7

    CSGO


    L 04/27/2020 - 0899: [SM] Exception reported: Native is not bound
    L 04/27/2020 - 0899: [SM] Blaming: sm_message_filter.smx
    L 04/27/2020 - 0899: [SM] Call stack trace:
    L 04/27/2020 - 0899: [SM] [0] BfReadString
    L 04/27/2020 - 0899: [SM] [1] Line 366, H:\_To_games\Left4Dead_2\My_mods\Admin-Security\MessageFilter\MessageFilter_v1.7\scr ipting\sm_message_filter.sp::UserMessage_SayT ext2
    L 04/27/2020 - 0899: [SM] [3] SetClientName
    L 04/27/2020 - 0899: [SM] [4] Line 396, anc.sp::ChangeClientName
    L 04/27/2020 - 0899: [SM] [5] Line 212, anc.sp::OnClientPutInServer
    Pala4 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 04-27-2020 , 02:10   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #8

    Needs
    PHP Code:
    g_Proto PbReadString 
    check instead of just
    PHP Code:
    BfReadString 
    line 366
    __________________

    Last edited by Silvers; 04-27-2020 at 02:10.
    Silvers is offline
    Pala4
    Senior Member
    Join Date: Dec 2007
    Old 04-28-2020 , 01:36   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #9

    I don't know how to do it right)



    Code:
    //// sm_message_filter.sp
    //
    // sm_message_filter.sp(366) : error 035: argument type mismatch (argument 3)
    // sm_message_filter.sp(366) : error 001: expected token: ":", but found ";"
    // sm_message_filter.sp(368) : warning 213: tag mismatch
    // sm_message_filter.sp(368) : error 001: expected token: ";", but found "if"

    Last edited by Pala4; 04-28-2020 at 01:37.
    Pala4 is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 04-28-2020 , 09:20   Re: [ANY] [RU] Message Filter (Censor)
    Reply With Quote #10

    Updated.

    Quote:
    1.8 (30-Sep-2019)
    - Fixed rare overflow in StringDeTranslit().

    1.9 (09-Dec-2019)
    - Fixed some condition issues caused by static in recurse call

    1.10 (27-Apr-2020)
    - Fixed compatibility with CS:GO.
    - Word filters are updated.
    - Removed dependency of chat processor (it is now optional).
    - Added compatibility with SCP (by minimoney1, fix by JoinedSenses): https://forums.alliedmods.net/showpo...&postcount=413
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    Reply



    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 20:07.


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