instead of useing
if ($2 isop $chan) || ($2 ishop $chan) {
you can also use
if ($nick(#,$2,oh)) {
it should do the same thing