if (($nick !isop) && ($nick !isvoice))

Other than that addition, your code is sound.