Code:
ctcp !@*:*:#: { if ($nick isreg #) { .signal -n d # $nick ctcp | halt } } 
on !@*:ctcpreply:*: { if ($nick isreg #) && ($me isop #) { .signal -n d # $nick ctcpreply | halt } } 
on ^!@*:text:*:#: { if ($nick isreg #) { .signal -n c # $nick $1- | halt } } 
on ^!@*:action:*:#: { if ($nick isreg #) { .signal -n c # $nick $1- | halt } } 
on ^!@*:notice:*:#: { if ($nick isreg #) { .signal -n c # $nick $1- | halt } } 
on *:signal:*: {
  if ($signal == c) { 
    if ($regex($3-,/[[:cntrl:]]/g) > 49) { .signal -n d $1-2 codes | halt } 
    if ($regex($3-,/[[:upper:]]/g) > 49) { .signal -n d $1-2 caps | halt } 
    if ($regex($3-,/\d/g) > 49) { .signal -n d $1-2 number | halt }
    if ($regex($3-,/[[:punct:]]/g) > 49) { .signal -n d $1-2 symbol | halt } 
    if ($regex($3-,/[ $chr(174) ]/g) > 49) { .signal -n d $1-2 ascii | halt } 
    if ($regex($3-,/[ $chr(160) ]/g) > 49) { .signal -n d $1-2 blur | halt } 
    if ($regex($3-,/./g) > 199) { .signal -n d $1-2 lenght | halt }
    if ($regex($3-,/(#|http://|www.|.com|.net|.org)/i)) { .signal -n d $1-2 advertise | halt }
    if ($regex($3-,/\b(fck|btch)\b/i)) { .signal -n d $1-2 swear | halt }
    .hinc -u5m e $+($1,$2) 1 
    if ($hget(e,$+($1,$2)) > 4) { .signal -n d $1-2 lines | halt }
    var %f = $+($2,@,$1,@,$hash($remove($3-,$chr(160),$chr(32)),32))
    hinc -u5m e %f 1 
    if ($hget(e,%f) > 2) { .signal -n d $1-2 repeat | halt }
  }
  if ($signal == d) { 
    if ($2 ison $1) { 
      .hinc -u25m e g  
      if ($hget(e,g) < 20) { !kick $1 $2 $3 }
      .hadd -u10m h $+($2,*@*fake*)
      .timer_ 1 3 !mode $chan $1 $+(+,$str(b,$hget(h,*).item)) $hget(h,1).item $hget(h,2).item $hget(h,3).item $hget(h,4).item $hget(h,5).item $hget(h,6).item $hget(h,7).item $hget(h,8).item $hget(h,9).item $hget(h,10).item $hget(h,11).item $hget(h,12).item 
    }
  } 
}


Could anyone help me to improve this codes. Turn this codes into good regex parser maybe .. Use other better comparison maybe .. Or shorten the codes that bocome faster .. Thanks ..

Last edited by BanJirian; 06/10/07 05:22 AM.