I don't understand the problem. I took the same alias you just pasted and then modified the bans so they would be a green or red echo instead, then i called the alias twice. The 1st time it didn't do anything, but the 2nd time it showed a green echo by banning the 2nd person, and then following that is the red echo banning the original nick - assuming they're still in channel. Do you not see the green then red bans?

//Xpro_check AnyNick1 test test | /Xpro_check AnyNick2 test test

Code
alias Xpro_check {
  if ($nick(#,$1,a,r)) return
  var %h = $+($md5($lower($strip($2-))),.,$chan,.,$network) 
  if ($hget(Xpro_check,%h) == $null) { hadd -mu5 Xpro_check %h $1 | return }
  echo 3 -s mode # +b $address($1,2) | if ($v1 != 1) echo 4 -s  mode # +b $address($v1,2) | hadd -mu5 Xpro_check %h 1
}