I see no difference in your script, $v2 returns exactly the same as $chan in this case. Unless you're using mIRC 5.8 or something, then you should upgrade ASAP.
and just add a line to ignore him, see /help /ignore for all sorts of switches and address types...
on *:INVITE:#: {
.timer 1 1 if ($nick !isop $chan) part $chan
ignore $nick
}