This will check the internal ban list for each and every channel that you and the person that changed their nick have in common, and will issue the ban command if their current nick is listed in the internal ban list.
NOTE: The checks and the ban will only be performed if you are an op on the respective common channel.
Code:
on *:nick:{
  var %a = 1, %b = $comchan($nick,0)
  while %a <= %b {
    if ($me isop $comchan($nick,%a)) {
      var %c = 1, %d = $ibl($comchan($nick,%a),0)
      while %c <= %d {
        if $newnick isin $ibl($comchan($nick,%a),%c) {
          .ban -k $comchan($nick,%a) $newnick
          %c = %d
        }
        inc %c
      }
    }
    inc %a
  }
}