you could also do it like this as well to reduce mode flood
ctcp *:unban:?: {
if ($3 !ischan) { .msg $Nick You must select a channel. | halt }
var %a = $Ibl($3,0), %b = 0
while ( %b <= %a ) {
if ($Ibl($3,%b) iswm $address($2,5)) { var %unbann $addtok(%unbann,$IfMatch,32) }
inc %b
}
mode $3 - $+ $str(b,%b) %unbann
}