REGEX Word Filter
6 Attachment(s)
Want to filter not only dirty words and potentially offensive phrases, but also things like IP and email addresses? Then this plugin is for you!
This plugin provides the ability to do the following things if a clients say text matches a provided REGEX pattern. (chatpattern) for chat 1. Execute an RCON command (action) 2. Limit the amount of times such a pattern may be spoken (limit) 3. Enforce the limit with a block of the text 4. Enforce the limit with a punishment RCON command (punish) 5. Allow for forgiveness of one violation every x seconds (forgive) 5. Block the text absolutely (no limit) (block) 6. Replace the matches with a string (replace) 7. Replace matches from ANOTHER REGEX pattern with a string (replacepattern) 8. Warn the client they are violating the matching rules (warn) 9. Allow admins with specified levels to be immune (immunity) All of this is done via a simple file format, no commands required! Format: The file, configs/regexrestrict.cfg, is structured in typical SM structure. To group a bunch of patterns to specific rules, put them all into a subsection together. Ex. Code:
"Censor" Chat Pattern: Search for a pattern Code:
"chatpattern" "pattern 'flags'" If no flags are set, omit the delimiting single quote characters. You may also delimit the pattern with single quotes for prettiness, ala: Code:
"chatpattern" " 'pattern' 'flags' " Code:
CASELESS - Ignore Case. Code:
"warn" "msg" Action: Executed if a pattern matches Code:
"action" "rcon action" %n, %i, and %u will be replaced with the clients name, index, or userid, respectively, if they are in the command string. Block: Block the text absolutely Code:
"block" "1" Limit: Limit the amount of times a piece of text can be said Code:
"limit" "number" Forgive: Forgives one indiscretion every x seconds Code:
"forgive" "x" Punish: executes a punishment command if limit is exceeded Code:
"punish" "cmd" %n, %i, and %u will be replaced with the clients name, index, or userid, respectively, if they are in the command string. Replace: I think you get it Code:
"replace" "with" Replace Pattern: Replace against a pattern To be added soon, currently just deletes based on pattern To do: Allow name and command enforcement Have fun! Edit: Altered slightly; will now accept a map based regex file, of the format "regexfilter_MAPNAME.cfg", and will power off if no regex filter files are found (for efficiency reasons). |
Re: REGEX Word Filter
Sweet!
|
Re: REGEX Word Filter
I get "Plugin failed to compile!" when trying to download.
When I tried to compile from source I got sm_regexfilter.sp(3) : fatal error 120: cannot read from file: "regex" Any ideas? Am I missing something? |
Re: REGEX Word Filter
Every god damn plugin...
You need to compile it on your LOCAL MACHINE against the LATEST BUILD. REGEX is a new extention, and you probably don't have it yet, so you need to upgrade, possibly to the unstable branch. My current version is 1.1.0.2061 |
Re: REGEX Word Filter
Note: There is a small bug, forgive isn't working quite the way it should. I'll fix it ASAP.
The bug lets someone dodge the limit once after the limit is reached. No big deal, just don't use forgive until I update it tonight. |
Re: REGEX Word Filter
if i use*
"chatpattern" "fuck 'CASELESS'" and when i say "fucking", "fucker", "fuck me" etc.. it will be blocked too? |
Re: REGEX Word Filter
Good day.
How long to wait for updated version of this great plugin ? Current version gets error on running. Compile successfully with 1.1.0.2427. Quote:
|
Re: REGEX Word Filter
Hey, I'm just curious. Do I need to do anything special in the cfg for two-word entries? Or does it need to be single word?
|
Re: REGEX Word Filter
what do you need in the cfg file to pick up on ip address and email address?
|
Re: REGEX Word Filter
well i guess kind of a moot thing this it doesn't work with the latest svn.
keep getting this when connecting Code:
Dropped EmoTears from server (x18;) |
All times are GMT -4. The time now is 15:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.