AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] [RU] Chat Message Filter (Censor) (https://forums.alliedmods.net/showthread.php?t=315451)

Dragokas 04-09-2019 10:26

[ANY] [RU] Chat Message Filter (Censor)
 
1 Attachment(s)
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

Dragokas 04-09-2019 14:26

Re: [ANY] [RU] Message Filter (Censor)
 
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)

Dragokas 04-21-2019 07:41

Re: [ANY] [RU] Message Filter (Censor)
 
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.

Dragokas 08-25-2019 09:07

Re: [ANY] [RU] Message Filter (Censor)
 
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.

shtopor 03-21-2020 03:39

Re: [ANY] [RU] Message Filter (Censor)
 
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));

Dragokas 03-21-2020 04:17

Re: [ANY] [RU] Message Filter (Censor)
 
What game?

Pala4 04-27-2020 01:41

Re: [ANY] [RU] Message Filter (Censor)
 
CSGO


L 04/27/2020 - 08:39:39: [SM] Exception reported: Native is not bound
L 04/27/2020 - 08:39:39: [SM] Blaming: sm_message_filter.smx
L 04/27/2020 - 08:39:39: [SM] Call stack trace:
L 04/27/2020 - 08:39:39: [SM] [0] BfReadString
L 04/27/2020 - 08:39:39: [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 - 08:39:39: [SM] [3] SetClientName
L 04/27/2020 - 08:39:39: [SM] [4] Line 396, anc.sp::ChangeClientName
L 04/27/2020 - 08:39:39: [SM] [5] Line 212, anc.sp::OnClientPutInServer

Silvers 04-27-2020 02:10

Re: [ANY] [RU] Message Filter (Censor)
 
Needs
PHP Code:

g_Proto PbReadString 

check instead of just
PHP Code:

BfReadString 

line 366

Pala4 04-28-2020 01:36

Re: [ANY] [RU] Message Filter (Censor)
 
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"


Dragokas 04-28-2020 09:20

Re: [ANY] [RU] Message Filter (Censor)
 
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


All times are GMT -4. The time now is 22:20.

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