ID:154326
 
Language Guard

This is a very simple little proc that I think will work quite well for blocking out "harsh" language. I thought I'd share it and see what other people think.

This is the code:
var/list/LG_List = list("Tweet","Scrock","Chirp","Honk")

proc/LGuard(msg)
var/check = 0
for(var/X in LG_List)
if(findtext(ckey(msg),X)) check = 1
return check
So, all you need to activate the Language Guard is the line, "if(LGuard(msg)) return". This works best in messages that have different outputs for usr and oview, such as:

usr << "You say, [msg]"
oview() << "[usr] says, [msg]"
That way, just by changing the above lines to:

usr << "You say, [msg]"
if(LGuard(msg)) return
oview() << "[usr] says, [msg]"
You can get rid of the unwanted language without the usr even knowing that his language is being blocked. The usr will still get the message as if they've said whatever they wanted to say, but no one else will hear it.

What do you think?

(PS, Yes, I used tricks from Vortezz's DBZ Name Blocker)
That is a nice and easy way of doing it, however people will start tricking it with things like periods in the words, spaces, etc. Just a small addon to that I see immediately, strip the words of punctuation first(ckey the entire msg) to prevent that.

Alathon
As a starting point I'd say that's very good; however it's important that people remember that some cuss words pop up as legitimate parts of other words. And there are even worse things people can say that might not end up on such a list.

My chat uses a language filter designed to nail people for extreme vulgarity; I'll probably implement something similar in my BYOND games. It has a rank for each cuss word, and knowledge of whether that word should be searched for on its own or also at the beginning/end/middle of another word. When a cuss word is detected, the user's total goes up; at 100 (like a percentage, basically), the user is kicked out. Whenever they don't cuss, their total slowly drops by a simple exponential formula. I have a similar scheme to deal with some forms of scrolling (also called spamming), and recently I added a little novelty whereby if the two ratings combined ever total 120 or more (meaning the user does a little of each), that earns a kick too.
I found in practice that certain words I'd weighted low had to be beefed up; the F word in particular is easy to abuse on a one-shot basis. It, however, has the advantage of not being a legitimate part of any word. Other cuss words can be recombined in various ways that can't really be caught without the risk of kicking users for saying something harmless.

In Incursion I may have a little problem with this language control scheme, however. The random name generator, you see, can produce just about anything valid-sounding, including some unintentionally humorous results. (Recent real-word gems include "Hugging" and "Abused" as territory names; thankfully not on the same run.) It would be uncommon, but possible, for it to spit out a territory with a name that would set off the filter. This would then make life difficult for anyone who tried to talk about it.

Lummox JR
In response to Lummox JR
Well, the idea behind the one I'm using was that it doesn't kick the user or anything, it just doesn't show anyone the "offending" message. To them, it'd probably suggest that, if no one responds to the message (that as far as they know everyone heard) then no one wants to talk about it.

This is mostly for outright vulgarity, such as the S and F words that are overly common on the internet. Ass isn't a bad word, it's the name of an animal. Same for bitch, so it wouldn't be right to block those. I'd just mute the people who abuse them :oP

Mostly, I don't care to see newbies logging in, getting board and spamming with messages such as "[usr] f**ks the chair."

Repeated offenders can just be banned, after they've been warned.
In response to Foomer
Foomer wrote:
This is mostly for outright vulgarity, such as the S and F words that are overly common on the internet. Ass isn't a bad word, it's the name of an animal. Same for bitch, so it wouldn't be right to block those. I'd just mute the people who abuse them :oP

That's mostly what I do. I keep only the worst words on my list. Well, that and the Y word (used by southerners), which I put in as a joke in the summer of 2000 after even the British were using it (egads) and found that its absence from chat was so relieving that I left it in.

Mostly, I don't care to see newbies logging in, getting board and spamming with messages such as "[usr] f**ks the chair."

Dang, I think that'd be fun to quote on the forums and such. Because after all, for anyone who'd bother to say that, they're probably telling the truth.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
In Incursion I may have a little problem with this language control scheme, however. The random name generator, you see, can produce just about anything valid-sounding, including some unintentionally humorous results. (Recent real-word gems include "Hugging" and "Abused" as territory names; thankfully not on the same run.) It would be uncommon, but possible, for it to spit out a territory with a name that would set off the filter. This would then make life difficult for anyone who tried to talk about it.

Why not run the generated territory names through the filter, and "boot" the offending territories? :-)
In response to Skysaw
Skysaw wrote:
Why not run the generated territory names through the filter, and "boot" the offending territories? :-)

What, and ruin the humor value? It'd make a game 20x more interesting if 4 players kept duking it out for control over Da[censored]istan. Imagine the delight of onlookers watching Ger[censored]ia conqured, or [censored]aland hoard all its resources in an effort to acquire a card.

Seriously though, I do intend eventually to have a host option for renaming territories. Anyway offensive ones aren't nearly as common as funny ones.

Lummox JR
In response to Lummox JR
Dammit, Lummox, you're worse than a pusher! You give me one taste of Incursion, and then you keep suggesting it, even though I don't got the dough to get the game.

(Well, that's a lie. I have $40.20 in my BYONDimes account.)
In response to Lummox JR
In Incursion I may have a little problem with this language control scheme, however. The random name generator, you see, can produce just about anything valid-sounding, including some unintentionally humorous results. (Recent real-word gems include "Hugging" and "Abused" as territory names; thankfully not on the same run.) It would be uncommon, but possible, for it to spit out a territory with a name that would set off the filter. This would then make life difficult for anyone who tried to talk about it.

Lummox JR

I had a strategy game project a while back, and my solution was simply to have the name generator produce ridiculous gibberish, thus lowering the chance for any actual words over 3 letters long without spoiling the humor value. It's not foolproof, though... once I did manage to get "Focker."
In response to Leftley
I was in that session! Bring back that game, Leftley!
In response to Lummox JR
Good points... sometimes, the more "powerful" a language filter is, the more it can hamper actual conversation.

A chatroom I used to use had a filter that not only found objectionable words inside of other words, it would "skip" spaces and punctuation, so if you said:

"I wish it would go away."

It came out as:

"I wi**** would go away."

You also couldn't say:

"As some" or "As soon."

It would interpret "go. ok?" as an ethnic slur and "off again" as a sexual orientation slur.

It got to the point where we had a game going to make the longest clean sentence with the most censored characters.
In response to Lesbian Assassin
Lesbian Assassin wrote:
Good points... sometimes, the more "powerful" a language filter is, the more it can hamper actual conversation.

A chatroom I used to use had a filter that not only found objectionable words inside of other words, it would "skip" spaces and punctuation, so if you said:

"I wish it would go away."

It came out as:

"I wi**** would go away."

You also couldn't say:

"As some" or "As soon."

It would interpret "go. ok?" as an ethnic slur and "off again" as a sexual orientation slur.

It got to the point where we had a game going to make the longest clean sentence with the most censored characters.

Sounds like a tougher game might have been to make the longest sentence without any censored characters at all.
In response to Lord of Water
Lord of Water wrote:
I was in that session! Bring back that game, Leftley!

That's rather freaky, as the instance I was referring to happened when I was testing something solo. Unconnected.
In response to Leftley
Well then, I can remember some naughty one that a player pointed out... indeed it must have been a seperate case, but I still want the game bac.
In response to Lord of Water
I am not sure if you guys have said any thing but I am just gonna say Theodis has a very good filter from what I have seen becuase I have seen it in CTF2 which is a fun original game :) Just a pitty I have not had the pleasure of playing the oringinal one he played :(

Stealth2k
In response to Lummox JR
kind of like AOL IM.... (Warning: 10%)
In response to Stealth 2k
Stealth 2k wrote:
I am not sure if you guys have said any thing but I am just gonna say Theodis has a very good filter from what I have seen becuase I have seen it in CTF2 which is a fun original game :) Just a pitty I have not had the pleasure of playing the oringinal one he played :(

Stealth2k

The original he made, you mean? It was good fun. The worst/best thing was that bombs were instantaneous -- anything within a certain radius was devastated.

I like the slow bombs now, but it was fun to set a Nuke in someone's castle and then run for your life.
In response to Spuzzum
Ya, you helped him make the 2nd one and I did to :) WHAT A TEAM...lol not really but I had fun, he ws the first person who I worked for on BYOND :)


Stealth2k