Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: kokia on Aug 23, 2015, 04:18 AM

Title: anti insult system
Post by: kokia on Aug 23, 2015, 04:18 AM
hello guys this is my code
else if(txt3[0].tolower() == "noob")
{
Message( "[#ffee00]Auto kicked "+player.Name+" for saying bad words.");
EchoMessage( ICOL_RED + "[" + player.ID + "] " + player.Name + " left the Server. (Kicked due to abusing.)" );
KickPlayer( player );
}
and whenever I type these words it kicks me but when i type word like hello noob it doesn't kicks please tell me how to make it like that
Title: Re: anti insult system
Post by: KAKAN on Aug 23, 2015, 04:29 AM
What's the need of it, huh? You can have a censor function, like @S.L.C made one Here (http://forum.vc-mp.org/?topic=381.0)
Title: Re: anti insult system
Post by: FinchDon on Aug 23, 2015, 06:55 AM
 i always use this and always work if you type hey ~

else if (GetTok( text, " ", 2 ).tolower() >="~")
Title: Re: anti insult system
Post by: Thijn on Aug 23, 2015, 09:10 AM
Quote from: FinchDon on Aug 23, 2015, 06:55 AMi always use this and always work if you type hey ~

else if (GetTok( text, " ", 2 ).tolower() >="~")
What?



You can use if ( text.find("noob") != null )
Title: Re: anti insult system
Post by: FinchDon on Aug 23, 2015, 10:03 AM
i am saying i add this on my ann command

else if (GetTok( text, " ", 2 ).tolower() >="~")

and if someone type !ann id hey ~ or ~ or hello ~

then its show the message

You are not allow to send this message
Title: Re: anti insult system
Post by: Thijn on Aug 23, 2015, 10:27 AM
That code wont work for a lot of sentences. "This code ~ is broken" for example.

Anyways, S.L.C. has posted an excellent snippet you can use.
Title: Re: anti insult system
Post by: . on Aug 23, 2015, 12:44 PM
What anyone should understand is that you can't have a complete word filtering system without having to deal with heavy computations that could potentially lag your server under many clients.

Simply because I can always obfuscate my words like: no0b, n0ob, n00b no'0b , n0.0b, n@@b, n()()b, n[][]b etc. and that list gets even bigger when you include case sensitivity. And that's just one word. Imagine 100 multiplied by at least 20 obfuscated versions depending on the word length and available l33t (https://en.wikipedia.org/wiki/Leet) characters. You get about 2,000 words to process on each chat message.

Now you want to take into consideration the false/positive words and typing mistakes in order to not kick a good client. And you have a ton of things to scan for. Of course your CPU isn't that stupid and can process those things especially if it's built with native code. But it's still not the best idea to have.

Just don't bother to make an all in one spam protection because you simply can't. Not without the consequences.
Title: Re: anti insult system
Post by: DizzasTeR on Aug 23, 2015, 01:40 PM
Keeping in mind what SLC said, this is where your staff responsibilities kicks in, if you have good staff, they will punish them, not everything should be handled server-sided, you can't accomplish everything with server.
Title: Re: anti insult system
Post by: EK.IceFlake on Aug 24, 2015, 07:10 AM
Quote from: Doom_Killer on Aug 23, 2015, 01:40 PMKeeping in mind what SLC said, this is where your staff responsibilities kicks in, if you have good staff, they will punish them, not everything should be handled server-sided, you can't accomplish everything with server.
And whats the need of increasing kills? Your good staff can just use /setkills.
Whats the need of a racing system? Your best-in-the-world staff can organize the race themselves
Hope you get the point
Title: Re: anti insult system
Post by: DizzasTeR on Aug 24, 2015, 09:19 AM
@NE.CrystalBlue, Common sense is a sense which is not very common.Your reply not just made me laugh but also realize that you are stupid.

Kills is not in correspondence to punish or racing. When you do naughty stuff or insults in school or class, your teachers punish you, but when you want to have a race you won't call your teachers to organize it for you.

A race gamemode is like an academy where you practice racing OR just go there for competition and all you have to do is have default work or gamemode to do/play in this case as an example race. Whereas in schools on an event or something else a race event is settled, its organized just like admins would on a DM server.

Hope you get the point.
Title: Re: anti insult system
Post by: . on Aug 24, 2015, 05:47 PM
The point. Yes, the POINT. Is that this talk isn't about racing and who organizes them. This is about bad/spam words in chat messages. Which is far from what you're talking about.
Title: Re: anti insult system
Post by: EK.IceFlake on Aug 25, 2015, 06:24 AM
Quote from: Doom_Killer on Aug 24, 2015, 09:19 AM@NE.CrystalBlue, Common sense is a sense which is not very common.Your reply not just made me laugh but also realize that you are stupid.

Kills is not in correspondence to punish or racing. When you do naughty stuff or insults in school or class, your teachers punish you, but when you want to have a race you won't call your teachers to organize it for you.

A race gamemode is like an academy where you practice racing OR just go there for competition and all you have to do is have default work or gamemode to do/play in this case as an example race. Whereas in schools on an event or something else a race event is settled, its organized just like admins would on a DM server.

Hope you get the point.
I hope that in a great moment in life, you gain the power to distinguish between jokes and reality.