AmytiX, $vnick and $opnick can only be used in conjunction with the voice and op event. You can't use them under a text event and expect them to be excluded.
You should either use:
if ($nick isop $chan) { halt }
if ($nick isvoice $chan) { halt }
Or:
if ($nick($chan,@%)) {
Or:
if ($nick($chan,oh)) {
You should use the iswm operator like Burrito said...or isin will do it too.