|
Joined: Aug 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Aug 2005
Posts: 15 |
please helpme alias u.y { var %h.rf a b c d e f g i j k l m n o ö p s t u ü v q w x z var %ha.sayi $wildtok(%h.rf,*,0,32) var %i = 1 while (%i <= %ha.sayi) { return $wildtok(%h.rf,*,%i,32) inc %i } } on @*:text:*:#:{ $u._(#,$nick,$1-) } alias u._ { var %ya.z $u.y var %x $+(*,$str(%ya.z, 3),*) ;3 Char limit if (%x iswm $3-) { ban -u30 $1 $address($2,2) kick $1 12 $2 Long char %ya.z } } code prop.. LONG CHAR Protection Simple : hiiiiiiiiiiiiiiiiiiiiii howwwwwwwwww arrrrrrrrrrrreeeeee youuu ;------- Please help me 
Last edited by Montana; 11/08/05 05:47 AM.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
What's it supposed to do?
|
|
|
|
Joined: Aug 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Aug 2005
Posts: 15 |
this code Long char (aaaaaaaaaaaaa) protection
|
|
|
|
Joined: Aug 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Aug 2005
Posts: 15 |
bingOOOo  Coding by goXXip  alias _long.char { var %::text $remove($1-,$chr(32))),%m = 1 while %m <= $len(%::text) { var %mid = $mid(%::text,%m,1) if $+(*,$str(%mid,5),*) iswm $1- { return $true } inc %m } } on 1:text:*:*: { if $_long.char($1-) { ban $chan $nick 2 kick $chan $nick Long Char Protection } }
|
|
|
|
Joined: Aug 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Aug 2005
Posts: 15 |
hash version alias _hash.start { var %hash = $numtok($1-,32),%tok = 1 while %tok <= %hash { var %gettok = $gettok($1-,%tok,32) if !$findfile($+(%gettok,.data)) { hmake %gettok 20 hsave %gettok $+(%gettok,.data) } else { hmake %gettok hload %gettok $+(%gettok,.data) } inc %tok } } on *:START: { _hash.start long.char } alias _long.char { hadd -m long.char full.line. $+ $1 $len($remove($2-,$chr(32))) var %mc = 1 while %mc <= $hget(long.char,full.line. $+ $1) { hadd -m long.char mid. $+ %mc $+ $1 $mid($2-,%mc,1) if $+(*,$hget(long.char,mid. $+ %mc $+ $1),*) iswm $2- { return $true } inc %mc } timer.temizle $+ $1 1 5 ._temizle($1,$2-) } alias _temizle { .hdel long.char full.line. $+ $1 var %k = 1 while %k <= $hget(long.char,full.line. $+ $1) { hdel long.char mid. $+ %k $+ $1 $mid($2-,%k,1) inc %k } } on 1:TEXT:*:#: { if $_long.char($nick,$1-) { ban $chan $nick 2 kick $chan $nick Log Char Protection } }
Last edited by Montana; 11/08/05 09:07 AM.
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
Just a few remarks: -> /var %something = value don't forget the = unless the %var is the result of a $identifier -> a while loop with as only function a return?? Well, I'd do it like this, but then again, I'm addicted to regex... on *:TEXT:*:#channelnamehere: {
if ($regex($1-,/([color:green][a-z][/color])[color:blue]\1\1\1[/color]/ig) >= [color:red]2[/color]) {
ban -ku3600 $chan $nick 5 You'rrrre outttt!!!!
}
} [a-z] means only check a to z for doubles, you can make it . (yes, one dot) to ban on ALL characters or [a-z_:!?'"] to match letters and some special signs. The \1\1\1 means 4 repeats of the same character are counted, you can add or remove \1's for other numbers... The 2 is how many different occasions in the same line are needed before action is taken. This is to prevent accidental banning if there happens to be a word with 3 same consecutive letters in your language 
|
|
|
|
Joined: Aug 2005
Posts: 15
Pikka bird
|
OP
Pikka bird
Joined: Aug 2005
Posts: 15 |
Just a few remarks: -> /var %something = value don't forget the = unless the %var is the result of a $identifier -> a while loop with as only function a return?? Well, I'd do it like this, but then again, I'm addicted to regex... on *:TEXT:*:#channelnamehere: {
if ($regex($1-,/([color:green][a-z][/color])[color:blue]\1\1\1[/color]/ig) >= [color:red]2[/color]) {
ban -ku3600 $chan $nick 5 You'rrrre outttt!!!!
}
} [a-z] means only check a to z for doubles, you can make it . (yes, one dot) to ban on ALL characters or [a-z_:!?'"] to match letters and some special signs. The \1\1\1 means 4 repeats of the same character are counted, you can add or remove \1's for other numbers... The 2 is how many different occasions in the same line are needed before action is taken. This is to prevent accidental banning if there happens to be a word with 3 same consecutive letters in your language Thanks Kelder very nice
|
|
|
|
|