mIRC Home    About    Download    Register    News    Help

Print Thread
#156515 17/08/06 12:36 PM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
Code:
 
on ^!@*:text:*:#: { if ($nick isreg #) { .signal -n c # $nick $1- | haltdef } }
on *:signal:*: { 
  if ($signal == c) {
    if ($regex($3-,/[[:cntrl:]]/g) > 49) { .signal -n d $1 $2 codes }
    if ($regex($3-,/[[:upper:]]/Sg) > 49) { .signal -n d $1 $2 caps }
    if ($regex($3-,/\d/Sg) > 49) { .signal -n d $1 $2 number }
    if ($regex($3-,/[[:punct:]]/Sg) > 49) { .signal -n d $1 $2 symbol }
    if ($regex($3-,/[ $chr(174) ]/Sg) > 49) { .signal -n d $1 $2 ascii }
    if ($regex($3-,/[ $chr(160) ]/Sg) > 49) { .signal -n d $1 $2 blur } 
    if ($regex($3-,/./Sg) > 199) { .signal -n d $1 $2 lenght }
    if ($regex($3-,/(www.)|(http:)|#/Sig)) { .signal -n d $1 $2 advertise } 
    if ($regex($3-,/\b(bitch|suck)\b/Sig)) { .signal -n d $1 $2 swear } 
  }
  if ($signal == d) {
    if ($2 ison $1) {
      .hinc -u2m d y 
      if ($hget(d,y) < 22) { !.quote -q kick $1 $2 $3 }
      Else { Halt } 
      .hadd -u2m o $+($2,*@*banned*)
    .timer_ 1 3 !mode $chan $1 $+(+,$str(b,$hget(o,*).item)) $hget(o,1).item $hget(o,2).item $hget(o,3).item $hget(o,4).item $hget(o,5).item $hget(o,6)).item $hget(o,7).item $hget(o,8).item $hget(o,9)).item $hget(o,10).item $hget(o,11).item $hget(o,12).item } 
  } 
}
 


How can I change $regex to $regsubex but its still works as codes above. Thanks

#156516 17/08/06 12:58 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Why use $regsubex? All you're doing is matching strings and sending out signals. You're not replacing anything.


Link Copied to Clipboard