and what's wrong with else if?
Code:
while ($nick($chan,%i)) {
  if ($nick($chan,%i) isop $chan) { do things here | goto end }
  if ($nick($chan,%i) isvo $chan) { do things here | goto end }
  :end
  inc %i
}


or
Code:
while ($nick($chan,%i)) {
  if ($nick($chan,%i) isop $chan) { do things here }
  else if ($nick($chan,%i) isvo $chan) { do things here }
  inc %i
}


Personally, the latter looks much more neat.