|
Joined: Sep 2007
Posts: 109
Vogon poet
|
OP
Vogon poet
Joined: Sep 2007
Posts: 109 |
It is valid? or it is possible to be improved
on *:TEXT:*:#:{
if ( $ulevel <= 2 ) {
;;Followed lines ;;
hadd -mu3 antiflood. $+ $chan $nick $+ @ $+ $rand(0,99999999) 1
if ( $hfind(antiflood. $+ $chan,$nick $+ @*,0,w).item >= 5 ) { msg or command | return }
;fin
;;Anti repeat ;;
inc -u10 %rp. [ $+ [ $hash($nick $chan $strip($1-),32) ] ]
if ( %rp. [ $+ [ $hash($nick $chan $strip($1-),32) ] ] == 3 ) { msg or command | return }
;;Max 150 characters ;;
if ( $len($strip($1-)) >= 150 ) { msg or command | return }
;;Anti Caps ;;
if ( $len($1-) < 9 ) { return }
if ( $calc(1 - ($len($removecs($strip($remove($1-,$chr(32))),A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)) / $len($strip($remove($strip($remove($1-,$chr(32))),$chr(32)))))) >= 0.8 ) {
inc -u600 %caps. [ $+ [ $hash($nick $chan ,32) ] ]
if ( %caps. [ $+ [ $hash($nick $chan ,32) ] ] == 1 ) { msg warning | return }
if ( %caps. [ $+ [ $hash($nick $chan ,32) ] ] >= 3 ) { msg or command | return }
}
}
}
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
It is valid? or it is possible to be improved
on *:TEXT:*:#:{
if ( $ulevel <= 2 ) {
;;Followed lines ;;
hadd -mu3 antiflood. $+ $chan $nick $+ @ $+ $rand(0,99999999) 1
if ( $hfind(antiflood. $+ $chan,$nick $+ @*,0,w).item >= 5 ) { msg or command | return }
;fin
;;Anti repeat ;;
inc -u10 %rp. [ $+ [ $hash($nick $chan $strip($1-),32) ] ]
if ( %rp. [ $+ [ $hash($nick $chan $strip($1-),32) ] ] == 3 ) { msg or command | return }
;;Max 150 characters ;;
if ( $len($strip($1-)) >= 150 ) { msg or command | return }
;;Anti Caps ;;
if ( $len($1-) < 9 ) { return }
if ( $calc(1 - ($len($removecs($strip($remove($1-,$chr(32))),A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z)) / $len($strip($remove($strip($remove($1-,$chr(32))),$chr(32)))))) >= 0.8 ) {
inc -u600 %caps. [ $+ [ $hash($nick $chan ,32) ] ]
if ( %caps. [ $+ [ $hash($nick $chan ,32) ] ] == 1 ) { msg warning | return }
if ( %caps. [ $+ [ $hash($nick $chan ,32) ] ] >= 3 ) { msg or command | return }
}
}
}
Instead of posting here for validility checks try the code see if it works :P There's not much to improve if anything. Its short formed code already.
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
|