Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: KEEN on January 28, 2010, 03:45:58 pm

Title: a step before OnPlayerSpeak() function...
Post by: KEEN on January 28, 2010, 03:45:58 pm
Hello, I would like to make a query. Is there any way of preventing spam on the servers? That is, a step before OnPlayerSpeak() function...

I tried with /gmute or RegExpReplace() in OnPlayerSpeak(), but this function is activated after the player said something

I wanna mute player or replace the text before he says on public chat

that's possible? thanks for your help
Title: Re: a step before OnPlayerSpeak() function...
Post by: croat1gamer on January 28, 2010, 04:08:12 pm
It isnt possible, but you can do it if a player says XY lines in a given time to mute him.

Its for a server, just to make sure that you are hosting a server.

If you are a player, you can do nothing, but manually enter /mute ID
Title: Re: a step before OnPlayerSpeak() function...
Post by: KEEN on February 01, 2010, 07:16:55 am
yes, I'm hosting a dedicated server, you say something with XY lines, can you explain me how? or guide me :D

If I work with XY lines, can I mute the player before the specific word appears in public, or make some action?

From: February 01, 2010, 08:32:21 am
I posted a comment in "Script Core Suggestion" post

OnDataArrival() event suggested

http://forums.soldat.pl/index.php?topic=26661.msg454819#msg454819 (http://forums.soldat.pl/index.php?topic=26661.msg454819#msg454819)
Title: Re: a step before OnPlayerSpeak() function...
Post by: Gizd on February 01, 2010, 12:25:45 pm
I posted a comment in "Script Core Suggestion" post

OnDataArrival() event suggested

http://forums.soldat.pl/index.php?topic=26661.msg454819#msg454819 (http://forums.soldat.pl/index.php?topic=26661.msg454819#msg454819)
EnEsCe isn't reading that topic anymore but he wouldn't add that anyway.
Title: Re: a step before OnPlayerSpeak() function...
Post by: Silnikos on February 01, 2010, 05:12:06 pm
yes, I'm hosting a dedicated server, you say something with XY lines, can you explain me how? or guide me :D

If I work with XY lines, can I mute the player before the specific word appears in public, or make some action?
He meant you can react after somebody said something. Why do you really want to do this before it happens? You still can gmute a player for some time after he said forbidden thing.
Title: Re: a step before OnPlayerSpeak() function...
Post by: KEEN on February 03, 2010, 03:15:36 pm
yes, I'm hosting a dedicated server, you say something with XY lines, can you explain me how? or guide me :D

If I work with XY lines, can I mute the player before the specific word appears in public, or make some action?
He meant you can react after somebody said something. Why do you really want to do this before it happens? You still can gmute a player for some time after he said forbidden thing.

yeah! of course, I can mute after someone says something forbidden, but I want mute before saying so, or perhaps prevent the other players can see the writing and I mute the player
Title: Re: a step before OnPlayerSpeak() function...
Post by: croat1gamer on February 03, 2010, 03:20:43 pm
Why so?

I call the Occam's razor on this.
Title: Re: a step before OnPlayerSpeak() function...
Post by: DorkeyDear on February 03, 2010, 10:06:16 pm
Why so?
So youngsters don't learn to swear (or other similar situations).
Title: Re: a step before OnPlayerSpeak() function...
Post by: KEEN on February 04, 2010, 11:27:42 am
Why so?
So youngsters don't learn to swear (or other similar situations).


Exactly, or another situation, like spam xD
Spam and swears are common problems, and there are always kids playing...
The spam and swears (most players has kids) is a basic problem
Title: Re: a step before OnPlayerSpeak() function...
Post by: croat1gamer on February 04, 2010, 11:37:14 am
Ban the player for 1 hour for swearing?
Also, dont forget that there is a million of ways how to avoid swear filters.

And LOL, CHILDREN
Do you notice the EXCESSIVE gore when you kill an enemy, and then you worry about swearing.
Title: Re: a step before OnPlayerSpeak() function...
Post by: KEEN on February 04, 2010, 11:47:43 am
that's a good point ahahaha

anyway, I'll have to investigate further
Title: Re: a step before OnPlayerSpeak() function...
Post by: JFK on February 04, 2010, 02:25:56 pm
Here's some scripts already made to filter words:

jrgp's Badword Filter (http://forums.soldat.pl/index.php?topic=28704.0) - with a customizable list of words and warning system.
my NoobLottery (http://forums.soldat.pl/index.php?topic=25613.0) - not that serious, only filters noob/newb and the english word for cigarette (hard-coded), then randomly distributes punishment. However it can work as example how to make a 'hard-to-avoid' word filter system using regular expressions. Feel free to ask me for help on that topic.
Title: Re: a step before OnPlayerSpeak() function...
Post by: KEEN on February 08, 2010, 01:27:01 pm
Hi JFK

I tried with "my NoobLottery" script on my server and works very well. I can see the filtered word by player (and he can seen too) but, in theory, the other players ingame isn't seen "noob, fag, etc"

I must to dedicate more time, I'll to ask you something surely, thanks for help me