then you should use $nick($1, %i, a, o) instead of $nick($1, %i, ao)

and not only in the condition of the while-loop but also the if-statement.

Code:
on *:op:#:{  
  if ($opnick == $me) { .timer 0 300 opcheck $chan }
}
alias opcheck {  
  if ($me isop $1) {    
    var %i = 1    
    while ($nick($1, %i, a, o)) {      
      if ($v1 isaop) || ($level($address($v1, 5)) == 2000) { mode $1 +o $nick($chan, %i, a, o) }      
      inc %i    
    }  
  }
}
 


only problem if you this method on ircX-servers the owners (+q) will still be affected, which is not the case with hvr (actually vr is enough since h is not used on most ircX servers)