alias opx {
if ($chr(35) isin $active) {
.set %x 1
}
while (%x <= $nick($chan,0)) {
if ($nick($active,%x) !isop $active) && ($level($address($nick($active,%x),1)) == x) {
mode $active +o $nick($chan,%x)
}
inc %x
}
}
}
its quite slow

but it worked for me
