I have created a little code for you that works via alias command "
/rb". Try this, this is probably exactly what you would like to see.
This the code removes all bans (with a time limit and the number of bans) found on the executable channel.
In the "
rb_set" alias, you can tune your own code settings:
%rb_num = sets the number of bans to be removed at a time in one line.
%rb_time = sets the amount of time in seconds after which it is necessary to repeat the removal of bans.
# Author: Epic (epicnet@mail.ru, http://epicnet.ru)
# Description: Removes bans with a time and quantity limit
-----------------------------------------------------
alias rb_set {
%rb_num = 10
%rb_time = 5
}
on *:INPUT:#: if ($1 == /rb) .hadd -m rb chan $chan
alias rb {
rb_set | var %ch $hget(rb,chan)
var %i 1 | while (%i <= %rb_num) {
if ($ibl(%ch,%i) == $null) .break
else var %cb = %cb $ibl(%ch,%i)
inc %i
}
if (%rb_num > 0) .mode %ch $+(-,$str(b,%rb_num)) %cb
if ($ibl(%ch,0) > 0 && %rb_time > 0) { .timerRB 1 %rb_time rb }
}