Or:
on @*:text:$($strip($+($iif($1 = !ban,$1),*))):#: { $iif($nick isop # && $2 ison # && $3 isnum,ban $+(-u,$3) # $2 5) }
I disregard the permission denied warning because it's not that important. He or she can't do squat without being an op anyway.