mIRC Home    About    Download    Register    News    Help

Print Thread
#150482 04/06/06 05:20 AM
Joined: Jun 2006
Posts: 2
T
Bowl of petunias
OP Offline
Bowl of petunias
T
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. =)

#150483 04/06/06 06:25 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
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.

#150484 04/06/06 08:17 AM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
http://www.mircscripts.net/comments.php?cid=1023

try searching through that website next time


If it ain't broken, don't fix it!
#150485 05/06/06 04:24 AM
Joined: Jun 2006
Posts: 2
T
Bowl of petunias
OP Offline
Bowl of petunias
T
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.

#150486 05/06/06 04:25 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
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.

#150487 05/06/06 04:55 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
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.
#150488 05/06/06 06:01 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
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
  }
}


Link Copied to Clipboard