if ($nick !isop $chan) && ($nick !isvoice #) {

Regards,