Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Censorship script (https://forums.graalonline.com/forums/showthread.php?t=43436)

Jeff 03-14-2003 01:35 AM

Censorship script
 
Here's a censorship NPC weapon I am releasing for the good of Graal. Most of the banned words are removed so as to not break forum rules. If you want the full script, including humorous exceptions, please email me.


EDIT: Function you() doesn't work correctly as it removes all quotes. It is remarked until I can devise a better solution for fixing these nuisances.
NPC Code:

//by Jeff (email: [email protected])
//to censor a word add it to the this.restrictedwords list
//Use at will so long as credits are intact
//#CLIENTSIDE
function you(){ //Borrowed from Kaimetsu. I am lazy.
//Function to check spelling of the words "you" and "are"
/* tokenize #c; for (i=0;i<tokenscount;i++) {
if(strequals(#t(i),u)){
setstring local.chat,#s(local.chat)you#K(160);
}else if(strequals(#t(i),r)){
setstring local.chat,#s(local.chat)are#K(160);
}else{setstring local.chat,#s(local.chat)#t(i)#K(160);}
}
setplayerprop #c,#s(local.chat); setstring local.chat,;*/
}


function generateCensor(){
//Exceptions to asterisking
setstring this.censor,;
if(strequals(#I(this.restrictedwords,i),plz)){
setstring this.censor,please;
}else if(strequals(#I(this.restrictedwords,i),pls)){
setstring this.censor,please;
}else{
//Asterisk generation
for(j=0;j<strlen(#I(this.restrictedwords,i));j++){ setstring this.censor,#s(this.censor)*;}
}
}
if (playerchats || created || playerenters) {
this.u=0;
setstring this.restrictedwords,ghey,plz,pls;//censored words
for(i=0;i<sarraylen(this.restrictedwords);i++){ //run through restricted words
if(indexof(#I(this.restrictedwords,i),#c)>=0){ //check for censored words
generateCensor(); //generate censor
setstring this.newchatstring,#e(0,indexof(#I(this.restricted words,i),#c),#c)#s(this.censor)#e(indexof(#I(this. restrictedwords,i),#c)+strlen(#I(this.restrictedwo rds,i)),-1,#c);
setplayerprop #c,#s(this.newchatstring);
addstring client.message,The word "#I(this.restrictedwords,i)" is not permitted on this server.;
i-=2;
}//end check for censored words
}//end run through restricted words
you(); //fix you
} //end playerchats





Again, put this on your server if you want. Hey, I even encourage you.

HoudiniMan 03-14-2003 01:47 AM

too bad there's nothing to force people to use "you're" instead of "your stuipd"... :\

Jeff 03-14-2003 01:57 AM

Quote:

Originally posted by HoudiniMan
too bad there's nothing to force people to use "you're" instead of "your stuipd"... :\

That'd require the thing to be able to parse the English language. Fat chance of that happening, especially with the poor grammar prevalent on Graal.

BeZeRkEr 03-14-2003 06:57 PM

One thing to do would be to ban leetspeak and internettalk like.. ur and u... and things like that... I did on my CS server :D

tlf288 03-14-2003 07:04 PM

Not really effective. All a player has to do is put quotation marks (" ") around what s/he says to avoide making the script tokenize correctly.

[edit] Nevermind, that is only on Kai's part. Because he uses tokenize and not indexof.

Jeff 03-14-2003 08:00 PM

Well, for the "u" and "r" thing you can use quotes...but in fact, this thing evidently removes all quotes. To fix this bug, just remark or remove the function "you"

konidias 03-14-2003 10:32 PM

Oasis has something 500 times better than a censor, thanks to Falados.

Oasis chat doesn't block out profanity or anything, so it's not a pain if someone says a curse word now and then. But it logs players using profanity, so if you use too much profanity, it will report you to RC, and from there, actions can be taken.

Googi 03-14-2003 11:31 PM

Quote:

Originally posted by konidias
Oasis has something 500 times better than a censor, thanks to Falados.
It's a censor, I don't really see how one can be all that much better than another.

Dach 03-14-2003 11:51 PM

Quote:

Originally posted by Googi


It's a censor, I don't really see how one can be all that much better than another.

no, it's a counter, counter + censor = different

Googi 03-15-2003 12:00 AM

Quote:

Originally posted by Dach
no, it's a counter, counter + censor = different
Yeah, I just noticed that. I thought Koni had said "a 500 times better censor" for some reason.

Jeff 03-15-2003 12:53 AM

The counter does nothing to actually inhibit the language, though. A good censor blocks the usage and provides a built-in warning that the word involved isn't allowed.

tlf288 03-15-2003 04:17 AM

Konidias's system isn't really a censor. More of a system to dissalow overuse of specific words.

HoudiniMan 03-15-2003 09:20 AM

Occasional swearing is even allowed in the Graal CoC...

I agree this "big bother" approach of koni's isn't the best way to go

Christian 03-15-2003 10:40 AM

Freedom of speech. :(

Christian 03-15-2003 10:51 AM

Graal got something called Graal Police.

Skyld 03-15-2003 01:25 PM

Idea¬
 
Didny anyone think that you could make a script to log any suspicious words, and then let the Police Team do something about it instead of the script doing something about it?

Torankusu 03-15-2003 04:54 PM

Quote:

Originally posted by Googi


Yeah, I just noticed that. I thought Koni had said "a 500 times better censor" for some reason.

He likes to try and brag. It gives himself a sense of superiority.

Goboom 03-15-2003 07:27 PM

Re: Re: Idea¬
 
Quote:

Originally posted by Kaimetsu

I bet Konidias thought of it. Since he DESCRIBED THE EXACT SAME SYSTEM JUST A FEW POSTS AGO.

Kaimetsu does pay attention...o.o.

Jeff 03-15-2003 10:43 PM

Re: Re: Re: Idea¬
 
Quote:

Originally posted by Goboom

Kaimetsu does pay attention...o.o.


Thank you, Captain Obvious.




And yes, people, a Big Brother approach to prevention of foul language is pointless, as it does nothing to actually inhibit the language.


As for those of you who point out that some swearing is permitted, on newmain we allow words like "damn" and even the S word. But not the F word, the N word or other major racial slurs, or certain words most often used as insults.

Tseng 03-15-2003 10:50 PM

Re: Re: Re: Re: Idea¬
 
Quote:

Originally posted by Goboom

Kaimetsu does pay attention...o.o.

Quote:

Originally posted by Jeff



Thank you, Captain Obvious.


http://www.face-first.net/postimages/obvious.jpg

Python523 03-15-2003 11:03 PM

Re: Re: Re: Re: Re: Idea¬
 
Quote:

Originally posted by Tseng

<pic goes here>

thats just...no...aftershock's obvious pic is so much better

HoudiniMan 03-16-2003 01:35 AM

yeah i loved the old captain obvious

tlf288 03-16-2003 03:08 AM

Re: Re: Re: Re: Re: Re: Idea¬
 
Quote:

Originally posted by Python523


aftershock's obvious pic is so much better

Show me it.

GoZelda 03-16-2003 12:31 PM

But, even if you have a censor thing, then people still find a way.
There is this online game i won't mention, that has censore.
If you type Da*n, it goes **** (Da*n is censored by me 0.o).
But people then use dam, and everyone recognizes. With msn, people do f*ck with o instead of a u.

alarid0 03-16-2003 06:19 PM

Well that's because people are ignorent. There is no possible way to actually abolish cursing whether it be spelled right or they avoid the censor. Least I can say for that is a couple of warning if caught avoiding censor and then a jailing after sometime, only if they enforce it to that extent.

PastAustin 03-17-2003 02:26 AM

Re: Censorship script
 
I am not too big on censorship...:-/

Quote:

Originally posted by HoudiniMan
too bad there's nothing to force people to use "you're" instead of "your stuipd"... :\
agreed.

Soul-Blade 03-17-2003 03:02 AM

I think a random character censoring approach is best...based on intensity.

Like the f word = @$(*

While, say, B or A words = *&!


So they still back a punch, but have no direct meaning hehe.

tlf288 03-17-2003 03:41 AM

Just set a stringlist with all the characters and you want to be written over the censored word. Then use #R to select a random one.

edit: nvm, this wouldn't work since #R is serverside only.

Jeff 03-17-2003 04:44 AM

Or, y'know, just create an asterisk string of equal length.

Googi 03-17-2003 06:19 AM

Quote:

Originally posted by Torankusu
He likes to try and brag. It gives himself a sense of superiority.
But this time I was only misreading what he said.

azuretek23 03-17-2003 11:14 PM

Quote:

Originally posted by alarid0
Well that's because people are ignorent. There is no possible way to actually abolish cursing whether it be spelled right or they avoid the censor. Least I can say for that is a couple of warning if caught avoiding censor and then a jailing after sometime, only if they enforce it to that extent.
hey can you contact me? [email protected] thanks ;)


All times are GMT +2. The time now is 03:37 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.