mIRC Home    About    Download    Register    News    Help

Print Thread
#127263 11/08/05 05:11 AM
Joined: Aug 2005
Posts: 15
M
Montana Offline OP
Pikka bird
OP Offline
Pikka bird
M
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
frown

Last edited by Montana; 11/08/05 05:47 AM.
#127264 11/08/05 06:12 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
What's it supposed to do?

#127265 11/08/05 06:34 AM
Joined: Aug 2005
Posts: 15
M
Montana Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Aug 2005
Posts: 15
this code Long char (aaaaaaaaaaaaa) protection

#127266 11/08/05 08:29 AM
Joined: Aug 2005
Posts: 15
M
Montana Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Aug 2005
Posts: 15
bingOOOo shocked shocked
Coding by goXXip grin
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
}
}

#127267 11/08/05 08:55 AM
Joined: Aug 2005
Posts: 15
M
Montana Offline OP
Pikka bird
OP Offline
Pikka bird
M
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.
#127268 11/08/05 09:24 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
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...

Code:
on *:TEXT:*:#channelnamehere: {
  if ($regex($1-,/([color:green][a-z][/color])[color:blue]\1\1\1[/color]/ig) &gt;= [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 smile

#127269 11/08/05 11:41 AM
Joined: Aug 2005
Posts: 15
M
Montana Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Aug 2005
Posts: 15
Quote:
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...

Code:
on *:TEXT:*:#channelnamehere: {
  if ($regex($1-,/([color:green][a-z][/color])[color:blue]\1\1\1[/color]/ig) &gt;= [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 smile


Thanks Kelder very nice


Link Copied to Clipboard