banlist copier is lil code allowing u to copy a banlist from chan to chan. ex: /copyban #channel1 #channel2 <- that wll read all the bans in #channel1 and bans it in #channel2 .. handy for channel owners
note: in my network the most number of bans at the same time is 12 ( +bbbbbbbbbbbb) so i added this line to maximize the banlist to 24 ban pertime if the user has more than 24 ban the command can be repeated..
if anyone has suggestion i will be glad to hear it
alias copyban {
if ($1 ischan) && ($2 ischan) {
if ($me isop $2) || ($me ishop $2) {
mode $1 +b
var %x $ibl($1,0)
var %y 0
while (%y <= %x) {
var %banlist = $(%banlist,$ibl($1,%y))
inc %y
}
mode $2 $+(+,$str(b,$ibl($1,0))) %banlist
if ($ibl($1,0) > 12) { mode $2 $+(+,$str(b,$ibl($1,0))) %banlist }
}
else { echo -a ur not op on $2 }
}
else { echo -a ur not on the channels }
}