mIRC Home    About    Download    Register    News    Help

Print Thread
#197264 01/04/08 12:35 AM
Joined: Sep 2007
Posts: 109
K
kwell Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Sep 2007
Posts: 109
As could make react on @:TEXT if someone writes ...

bad-words *
* bad-words
* bad-words *




kwell #197266 01/04/08 01:02 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
There are a number of bad word scripts already written. I suggest you look at Hawkee and mIRC Scripts

kwell #197302 01/04/08 06:56 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on @*:text:*:#:{
  var %badwords = bad words here separated by spaces, %i = 1
  while ($gettok(%badwords,%i,32)) {
    if ($istok($1-,$v1,32)) <do stuff>
    inc %i
  }
}

hixxy #197307 01/04/08 09:03 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
crap. crap! crap?


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
argv0 #197308 01/04/08 09:28 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Not what he asked for, but:

/set %badwords bad|words|here|separated|by|pipes

Code:
on @$*:text:$(/(?<=^|[ ,])( $+ %badwords $+ )[!?.]*(?= |$)/i):#:{
  <do whatever>
}

hixxy #197309 01/04/08 09:35 PM
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
if you're using a regex you may as well just use \b as the word boundary...


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard