mIRC Home    About    Download    Register    News    Help

Print Thread
#117306 14/04/05 02:22 PM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
i was looking for a snippet for a long time which would keep my ban list not full all the time.

nowadays when spam rulz, my banlist gets full (100 bans) in about 2 hours... mad

and i would like to find smth interesting that would keep my banlist at 95 full in case...

and after a new ban it should unban the oldest one...

crazy huh? but i need smth like that!

#117307 14/04/05 03:34 PM
Joined: Dec 2002
Posts: 59
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2002
Posts: 59
If you learn some simple scripting you can easily achive this.

$ibl(#chan,0) will get the total number of bans
$ibl(#chan,%i).ctime will get the time ban %i was set

on ban
if ($ibl(#chan,0) > 95) { loop thru bans to find the oldest ban | unban oldest ban }

#117308 14/04/05 05:14 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
alias blimit {
var %i = $ibl($1,0)
while (%i > 95) {
var %r = %r $ibl($1,$v1)
if ($numtok(%r,32) == $modespl) {
mode $1 $+(-,$str(b,$v2)) %r
var %r
}
dec %i
}
if (%r) mode $1 $+(-,$str(b,$numtok(%r,32))) %r
}

/blimit #channel

~ Edit ~
Changed it to match $modespl

Last edited by mIRCManiac; 14/04/05 05:18 PM.
#117309 15/04/05 05:47 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
thnx lads i'll try how it works today!

#117310 15/04/05 08:20 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
seems that it works but i have to write all the time /blimit #chan

and i want script to manage banlist automatically! without my help

#117311 15/04/05 09:21 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Use a timer something like .timerblimit 0 300 blimit $$1.

How you trigger the timer of course is your prerogative.

#117312 15/04/05 02:20 PM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
where should i put in script huh?

#117313 15/04/05 02:34 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
on me:*:JOIN:#:.timer.blimit. $+ # 0 300 blimit #

alias blimit {
if ($1 !ischan) {
.timer.blimit. $+ $1 off
return
}
if ($me !isop $1) return
var %i = $ibl($1,0)
while (%i > 95) {
var %r = %r $ibl($1,$v1)
if ($numtok(%r,32) == $modespl) {
mode $1 $+(-,$str(b,$v2)) %r
var %r
}
dec %i
}
if (%r) mode $1 $+(-,$str(b,$numtok(%r,32))) %r
}

Last edited by mIRCManiac; 15/04/05 02:37 PM.
#117314 26/04/05 11:27 AM
Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
this one works like a bee, thnx a lot!


Link Copied to Clipboard