This is based on similar requests that I have seen a number of times previously, so it should work without any problems. Your obviously fairly skilled in mIRC scripting already, so there shouldn't be anything you don't understand, however, if there is, then I'd be happy to explain anything you don't understand
Code:
menu channel { 
  fix channel: fix $chan
}
alias fix {
  var %a = 1, %b = $nick($1,0,a,o)
  while %a <= %b {
    var %nick = $nick($1,%a,a,o), %address = $address(%nick,2)
    if ($ulist(%address,3,1) && $ulist(%address).info == owner) || ($ulist(%address,2,1) && $ulist(%c).info == $1) {
      set %opnick $addtok(%opnick,%nick,32)
      if $numtok(%opnick,32) == $modespl {
        .mode $1 $+(+,$str(o,$modespl)) %opnick
        unset %opnick
      }
    }
    inc %a
  }
  if %opnick {
    .mode $1 $+(+,$str(o,$modespl)) %opnick
    unset %opnick
  }
}