when you use if (!evaluates as number) it fills $v1 with the opposite state. i.e.

//if (!$false) noop | echo -a $v1 is $true
//if (!$true) noop | echo -a $v1 is $false


So this is another example if why I warn against using the if (thing) unless you know for sure that 'thing' is a number and can never be $null. Or in this case needing to use $v1. To keep from having the value flipped by the '!', you can do:

if ($hget(Xpro_check,%h) != $null)

... and that preserves $v1 as the expected value, and your problem would have been exposed by a debug echo of what the $v1 value would have been after the 1st nick is banned

And, it sounds like you intend to stack the bans, which means you'll eventually replace the ban command with some kind of pushmode command. But if that doesn't preserve the $v1 value, then you're suddenly hosed again, so in that case you need to save /var %v1 $v1 to keep it being destroyed by an alias.