|
Joined: Jun 2006
Posts: 2
Bowl of petunias
|
OP
Bowl of petunias
Joined: Jun 2006
Posts: 2 |
I'd hate to ask anyone to make a script, but I'm completely inept at such, and have tried. I'm sure something similar has already been made, after all.
Could anyone make/find a script to catch a cuss word from anywhere in the sentence, and then change it to the user's background color? So effectively it looks like there is a space missing where a word was? I've looked for hours and found nothing.
Thanks in advance, everyone. =)
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
theres plenty of scripts like that around, but i hope you understand that these scripts work on your client only, so your the only one that sees this altered display.
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
If it ain't broken, don't fix it!
|
|
|
|
Joined: Jun 2006
Posts: 2
Bowl of petunias
|
OP
Bowl of petunias
Joined: Jun 2006
Posts: 2 |
I'll use that site, and thanks. However that one you linked's profanity filter is for changing words you type to something more appropriate when you press enter.
Just to clarify, I was curious if something is possible that when someone else uses a certain word, that it will bleep it out in some way.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
on ^*:text:*:*:{
var %filter = bastard|cunt|twat
echo $colour(norm) -bfilmrt $target $+(<,$nick,>) $regsubex($1-,/\b( %filter )\b/gix,$+($chr(3),$colour(norm),$chr(44),$colour(background),\t,$chr(3)))
haltdef
} - untested.
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
[*] $target returns your own nick in private messages, so /echo won't echo to the correct window. I use $iif(#,#,$nick)
[*] Didn't you mean $+($chr(3),$colour(background),$chr(44),$colour(background).dd,\t,$chr(3)) ? (I used the .dd property in the 2nd $colour(), just in case the OP defines words 1ik3 7h3s3)
[*] Ideally, replacing should be done on stripped text (or you could go out of your way and construct a regex that also matches/replaces ctrl-coded text...)
[*] I'd halt the default display only if there's actually a swear word in the text.
Last edited by qwerty; 05/06/06 05:08 PM.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
alias censor {
var %words = piss|twat|cunt|bitch
return $regsubex($1,/\b( %words )\b/gixS,$+($chr(3),$colour(background),$chr(44),$colour(background).dd,\t,$chr(3)))
}
on ^*:text:*:*:{
if ($censor($1-) != $strip($1-)) {
var %text = $v1
echo $colour(norm) -bfilmrt $iif($chan,$v1,$nick) $+(<,$nick,>) %text
haltdef
}
}
|
|
|
|
|