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

[ANY] Universal Chat Filter (Version 1.2.2, 2019-01-05)


Post New Thread Reply   
 
Thread Tools Display Modes
almostagreatcoder
Member
Join Date: Oct 2015
Old 10-05-2016 , 10:38   Re: [ANY] Universal Chat Filter (Version 0.9.9, 2016-10-05)
Reply With Quote #11

Quote:
Originally Posted by Sw33T3R View Post
Hi
How can i hide a ! chat trigger?
I want only hide !menu
Well you could use something like this in the chatfilter.cfg:
Code:
"Hide commands"
{
	"section id"	33	// whatever number you like
	"Handle commands"
	{
		"mode"		2	// replace the whole statement
		"find"		"\b!menu\b"	// \b is a word boundary
		"replace"	" "
	}
}
...but you are also aware of the "silent" command trigger "/"? Have you tried "/menu"?! This should even work without any plugin

Last edited by almostagreatcoder; 10-05-2016 at 10:39. Reason: ...just syntax.
almostagreatcoder is offline
AndrewJackson
Junior Member
Join Date: Apr 2016
Old 10-09-2016 , 08:30   Re: [ANY] Universal Chat Filter (Version 0.9.9, 2016-10-05)
Reply With Quote #12

Quote:
Originally Posted by almostagreatcoder View Post
Well you could use something like this in the chatfilter.cfg:
Code:
"Hide commands"
{
	"section id"	33	// whatever number you like
	"Handle commands"
	{
		"mode"		2	// replace the whole statement
		"find"		"\b!menu\b"	// \b is a word boundary
		"replace"	" "
	}
}
...but you are also aware of the "silent" command trigger "/"? Have you tried "/menu"?! This should even work without any plugin

I attempted to use option while using ckSurf (CSGO).

ckSurf plugin has a built in chat processor but it conflicts with name & message color plugins, when ckSurf's chat processing is disabled...chat and name color plugins work. Disabling ckSurf's chat processor also allows commonly used commands like !r, !restart, !b, etc... to display on the screen.

So I attempted to use the scenario quoted above to filter those commonly used commands from the chat. Using the simple chat processor version, I get no errors in the logs but the commands still show up in chat. I tried a couple different modifications of it, with no luck. Using Redwerewolf's chat processor version, the words still show up in chat along with a small text string from the plugin, and the following errors get logged:

Code:
L 10/09/2016 - 07:15:14: [SM] Exception reported: Invalid plugin address
L 10/09/2016 - 07:15:14: [SM] Blaming: chat-processor.smx
L 10/09/2016 - 07:15:14: [SM] Call stack trace:
L 10/09/2016 - 07:15:14: [SM]   [0] Call_Finish
L 10/09/2016 - 07:15:14: [SM]   [1] Line 193, D:\Files\Google Drive\SourcePawn\Projects\Chat-Processor\scripting\chat-processor.sp::OnSayText2

I'm not very familiar with using word filters and stuff so I wanted to post this here. It would be great if this could filter commonly used chat commands while still making them function as intended, especially ckSurf.
AndrewJackson is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 10-09-2016 , 15:48   Re: [ANY] Universal Chat Filter (Version 0.9.9, 2016-10-05)
Reply With Quote #13

Would it be possible to use this plugin to counter act spammed messages? Not necessarily the content of the spam, but the frequency they are posted? I'm thinking about people who post those 'Lenny' faces which I want to allow provided they don't fill the chat with them. Should they spam, then I'll gag them
__________________
Werewolf_UK is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 10-11-2016 , 15:30   Re: [ANY] Universal Chat Filter (Version 0.9.9, 2016-10-05)
Reply With Quote #14

I'm having a persistent issue with this plugin. It keeps flagging up a "Error in config file line xxx:" every time I update my chatfilter.cfg file, even for lines that previously worked and had not changed.

For example, I have both the words "Rape" and "Retard" blocked on my servers. Due to a typo in the entry for the word "rape", I updated the config to fix it and reloaded it on the server, only for it to find a new error in my entry for "retard". I hadn't changed that entry but now the whole plugin fails because I changed a different word.

So far I've had this error 20+ times, each time it throws up a new line for me to check. Each and every entry on my list had been checked against the Regex101 checker, and it didn't flag up any errors.

As I said, each entry appears to work fine until I make a change somewhere else then it breaks another entry at random.
__________________
Werewolf_UK is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 10-20-2016 , 07:56   Re: [ANY] Universal Chat Filter (Version 0.9.9, 2016-10-05)
Reply With Quote #15

Quote:
Originally Posted by sgt_phsco View Post
I'm having a persistent issue with this plugin. It keeps flagging up a "Error in config file line xxx:" every time I update my chatfilter.cfg file, even for lines that previously worked and had not changed.

For example, I have both the words "Rape" and "Retard" blocked on my servers. Due to a typo in the entry for the word "rape", I updated the config to fix it and reloaded it on the server, only for it to find a new error in my entry for "retard". I hadn't changed that entry but now the whole plugin fails because I changed a different word.

So far I've had this error 20+ times, each time it throws up a new line for me to check. Each and every entry on my list had been checked against the Regex101 checker, and it didn't flag up any errors.

As I said, each entry appears to work fine until I make a change somewhere else then it breaks another entry at random.
Could you send me the config file you used? There has to be a syntax error you are overlooking at, I guess...
almostagreatcoder is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 10-20-2016 , 08:37   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #16

Quote:
Originally Posted by Sw33T3R View Post
Hi
How can i hide a ! chat trigger?
I want only hide !menu
With the new version from today, I added the replacement mode 4 to the Chatfilter, so you now can mark a match as to not showing up to other players. So you could use a config like this:
Code:
"Hide commands"
{
	"section id"	45	// whatever number you like
	"Handle commands"
	{
		"mode"		4	// do not show the chat entry to others
		"find"		"\b!menu\b"	// \b is a word boundary
		"replace"	"$0"
	}
}
almostagreatcoder is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 11-22-2016 , 14:41   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #17

I'm not too familiar with regex so I figured I'd post here and figure out if there's an easier way to do what I'm attempting.

I'm using this as mainly a racism & punishment filter on my servers. I have the basic words & alternatives down, but there's always people trying to go around it.

For example (without using explicit language), I'm trying to filter this word:
asdfe

I already have asdf3 blocked, because that's what people commonly try next. However, if someone adds a space in between a letter, it still goes through (example: asdf e).

This leads to my question: Is there an easy way to block that combination of letters with spaces in between or do I have to create every space possibility in between with a new entry?

Edit: Current example entry looks like:
Code:
"find"		"\b!asdfe\b"
"find"		"\b!asdf3\b"
__________________

Last edited by sneaK; 11-22-2016 at 14:45.
sneaK is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 11-22-2016 , 14:45   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #18

Quote:
Originally Posted by blackhawk74 View Post
I'm not too familiar with regex so I figured I'd post here and figure out if there's an easier way to do what I'm attempting.

I'm using this as mainly a racism & punishment filter on my servers. I have the basic words & alternatives down, but there's always people trying to go around it.

For example (without using explicit language), I'm trying to filter this word:
asdfe

I already have asdf3 blocked, because that's what people commonly try next. However, if someone adds a space in between a letter, it still goes through (example: asdf e).

This leads to my question: Is there an easy way to block that combination of letters with spaces in between or do I have to create every space possibility in between with a new entry?
I use the code below between letters to counteract spaces/charactor combinaitons:
Code:
[\W*]{0,99}
So to use your example, your filter would look something like:
Code:
[a][\W*]{0,25}[s][\W*]{0,25}[d][\W*]{0,25}[f][\W*]{0,25}[e]
__________________
Werewolf_UK is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 11-22-2016 , 14:56   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #19

Thanks sgt_phsco!

If I'm reading this correctly, this also accounts for character replacement with the [\W*](say the 3, in my example)?

But would this also filter words that start with an "a" and use any other 4 characters following?
__________________

Last edited by sneaK; 11-22-2016 at 14:56.
sneaK is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 11-22-2016 , 15:05   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #20

No, it's very specific. I prefer to encase each letter of a word in squared brackets [], then add in alternative letters in with them.

So to use your example again, asdfe becomes:
Code:
"find"     "[Aa][Ss][Dd][Ff][Ee3]"
That string will look for one of the characters in each box and only match if the whole set of boxes matches. Or in other words, "asdFe", "Asdfe", and "asdf3" would all be captured by it.

I take this a step further by adding in the [\W*]{0,99}, like so:
Code:
"find"     "[Aa][Ss][Dd][Ff][Ee3]"
This prevents people from using spaces or other non-leter/number characters. Meaning "asd fe", "a-sdfe", even
Code:
"as                                                            dfe"
would get caught.
__________________

Last edited by Werewolf_UK; 11-22-2016 at 15:06.
Werewolf_UK 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:58.


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