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
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 12-20-2016 , 11:26   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #21

Another question here. I have a section setup for dealing with racism. However, if a person types in a specified word twice in one sentence, it automatically skips action #1 and goes straight to #2. How can I avoid that?

Code:
	"limit1"	1
	"action1"	"sm_psay #userid \"Please do not use racism here!\""
	"limit2"	2
	"action2"	"sm_psay #userid \"If you continue using racist language here, you will be banned on your next offense!\""
	"limit3"	3
	"action3"	"sm_ban #userid 4320 Auto-banned for repeated racism"
Mode is 4, penalty is set to 1.

Also, completely unrelated, is it possible to add cooldown as an option? For example, cooldown for an action or replacement? Closest I see so far is probability.
__________________

Last edited by sneaK; 12-20-2016 at 11:33.
sneaK is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 12-21-2016 , 01:23   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #22

Quote:
Originally Posted by blackhawk74 View Post
Another question here. I have a section setup for dealing with racism. However, if a person types in a specified word twice in one sentence, it automatically skips action #1 and goes straight to #2. How can I avoid that?

Code:
	"limit1"	1
	"action1"	"sm_psay #userid \"Please do not use racism here!\""
	"limit2"	2
	"action2"	"sm_psay #userid \"If you continue using racist language here, you will be banned on your next offense!\""
	"limit3"	3
	"action3"	"sm_ban #userid 4320 Auto-banned for repeated racism"
Mode is 4, penalty is set to 1.
I'm not quite sure, since I couldn't test it - but using mode 3 should do the trick.

Quote:
Also, completely unrelated, is it possible to add cooldown as an option? For example, cooldown for an action or replacement? Closest I see so far is probability.
That's an interesting idea and could totally be possible. But what would you expect to happen if someone triggers a certain action with the cooldown time not passed yet. Nothing? (Which would be odd if you try to prevent some unwanted behaviour in the chat.)
almostagreatcoder is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 12-23-2016 , 01:52   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #23

Quote:
Originally Posted by almostagreatcoder View Post
I'm not quite sure, since I couldn't test it - but using mode 3 should do the trick.
Hey, I prefer to use mode #4, because if I use mode #3, the message shows up as a blank sent message to everyone in the server. I discovered indeed that Mode #4 causes this issue.

I messed around with my config and this is how I consistently "skipped" action #1, using mode 4.

My test config:

Spoiler


How to reproduce:
1. Use this config or similar
2. Type in chat (without quotes): "pleb pleb" or "pleb i am a pleb" or even "pleb test pleb test pleb" (note that the word to be found was used 3 times)
3. Every single time, detection #2 is popped at the very first.

Mode #3 did not have this issue.

Quote:
Originally Posted by almostagreatcoder View Post
That's an interesting idea and could totally be possible. But what would you expect to happen if someone triggers a certain action with the cooldown time not passed yet. Nothing? (Which would be odd if you try to prevent some unwanted behaviour in the chat.)
Here's an example of what I was hoping to accomplish with "cooldown" - sometimes players wish to get information about the server, or other features that may be available. For example, the player wishes to know what the IP is to Teamspeak - so they can type !ts, and get responded to with the IP address. However, adding cooldown would be helpful as to avoid spamming, since in some instances it would be broadcast to the entire server, instead of just the user.
__________________
sneaK is offline
ChoclatePancake
Junior Member
Join Date: Sep 2009
Old 12-24-2016 , 16:45   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #24

How would i go about setting this up for synergy?
ChoclatePancake is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 12-24-2016 , 19:06   Re: [ANY] Universal Chat Filter (Version 1.0.1, 2016-12-25)
Reply With Quote #25

Quote:
Originally Posted by blackhawk74 View Post
Hey, I prefer to use mode #4, because if I use mode #3, the message shows up as a blank sent message to everyone in the server. I discovered indeed that Mode #4 causes this issue.
Oh - you are right. Using mode #3 resulted in blank lines in the chat. This was not the intended behaviour - it was a mistake in the code.

I just now released a new version (1.0.1) of the plugin. Using it should eleminate your problem. Just use mode #3 and everything's fine!
almostagreatcoder is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 12-24-2016 , 19:22   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #26

Quote:
Originally Posted by blackhawk74 View Post
Here's an example of what I was hoping to accomplish with "cooldown" - sometimes players wish to get information about the server, or other features that may be available. For example, the player wishes to know what the IP is to Teamspeak - so they can type !ts, and get responded to with the IP address. However, adding cooldown would be helpful as to avoid spamming, since in some instances it would be broadcast to the entire server, instead of just the user.
I see! I just wonder: wouldn't sourcemod's antiflood feature do exactly what you want? If you take a look into the sourcemod.cfg file (located in [game folder]/cfg/sourcemod/):
Code:
// Specifies the amount of time that is allowed between chat messages.  This
// includes the say and say_team commands.  If a client sends a message faster
// than this time, they receive a flood token.  When the client has accumulated
// 3 or more tokens, a warning message is shown instead of the chat message.
// --
// Requires: antiflood.smx
// Default: 0.75
sm_flood_time 0.75
Or do you think it would be useful to have a separate cooldown timing for the chat triggers you described in your example?
almostagreatcoder is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 12-24-2016 , 19:25   Re: [ANY] Universal Chat Filter (Version 1.0.0, 2016-10-20)
Reply With Quote #27

Quote:
Originally Posted by ChoclatePancake View Post
How would i go about setting this up for synergy?
I'm sorry, I don't have a Synergy server, so I cannot give any hints. But since it is a HL2 mod and if you are able to set up sourcemod on your server, it should be possible?!
almostagreatcoder is offline
kriz_cold
Junior Member
Join Date: Mar 2016
Location: Chile
Old 05-06-2017 , 03:15   Re: [ANY] Universal Chat Filter (Version 1.0.1, 2016-12-25)
Reply With Quote #28

This plugin is almost perfect...
But there's some glitches with the COLORFLOW function:
With some lenghts of the chat message, the string just cut the final letters in some ranges,
For example: I can tip:
||||||||||||||||||||||||||||||
and
|||||||||||||||||||||||||||||||||||
but I can't
||||||||||||||||||||||||||||||||
Basically, I can tip strings<80 and strings>85 but no 81, 82... characters (cutting to 80)
That happend with more ranges

Also, when you are reaching the chat lenght limit, the coloflow looses and the chat say something like:
[SampleTag] Kriz_cold: {COLORFLOW:0033FF-00F2F2}teeeeeeeeeeeeeeeeeeeeesting stuffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffff
(This can be fixed using a non direct replacing method, like the plugin uses, or just disabling the colorflow when a limit is reached)

I apologize for my bad english, but I hope you can fix these glitches, specially the first one. You can talk with me if you need more details.
kriz_cold is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 06-18-2017 , 09:28   Re: [ANY] Universal Chat Filter (Version 1.0.1, 2016-12-25)
Reply With Quote #29

Oh sorry for letting you wait so long! I haven't been active here for a while - but I will look into this in the next days.

Quote:
Originally Posted by kriz_cold View Post
This plugin is almost perfect...
Also, when you are reaching the chat lenght limit, the coloflow looses and the chat say something like:
[SampleTag] Kriz_cold: {COLORFLOW:0033FF-00F2F2}teeeeeeeeeeeeeeeeeeeeesting stuffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffff
(This can be fixed using a non direct replacing method, like the plugin uses, or just disabling the colorflow when a limit is reached)

I apologize for my bad english, but I hope you can fix these glitches, specially the first one. You can talk with me if you need more details.
OK, this one is a litte bit tough, because it leads to the question: what should happen, when a replacement exceeds the max. no. of characters? If the plugin would always ignore this very replacement rule, it would probably not be the expected behaviour (e.g. when you want to filter out bad language). So, I could try to implement this only for color flows: when the resulting string is too long, don't do anything. But due to the logic of replacements, this is not an easy thing to do. Will take some time...
almostagreatcoder is offline
almostagreatcoder
Member
Join Date: Oct 2015
Old 06-18-2017 , 09:30   Re: [ANY] Universal Chat Filter (Version 1.0.1, 2016-12-25)
Reply With Quote #30

Quote:
Originally Posted by kriz_cold View Post
This plugin is almost perfect...
But there's some glitches with the COLORFLOW function:
With some lenghts of the chat message, the string just cut the final letters in some ranges,
For example: I can tip:
||||||||||||||||||||||||||||||
and
|||||||||||||||||||||||||||||||||||
but I can't
||||||||||||||||||||||||||||||||
Basically, I can tip strings<80 and strings>85 but no 81, 82... characters (cutting to 80)
That happend with more ranges
I lost some hours of lifetime testing that...
You are right, I can reproduce this behaviour as well - but I didn't manage to fix it, yet. This may also take some time to be solved...
almostagreatcoder 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 11:11.


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