opcount { set %incnum 1 set %opcount 0 while ($chan(%incnum)) { if ($me isop $chan(%incnum)) { inc %opcount } inc %incnum } return %opcount }