You could put in an alias to do it...
In aliases tab:
/bn {
if ($2 == $null) { echo -a Please specify a nick. | return }
if ($2 !ison $chan) { echo -a $2 is not in this channel. | return }
ban -k $chan $gettok($address($nick,1),1,64) $+ @*
}
Use: /bn nick
Note that the person must be in the channel for it to work.
This will ban using this format (which I assumed from your description is what you wanted):
*!*ident@*
I can't test this on a network with over 10 letters in the ident, so you need to test it yourself. As long as $address shows all the letters, it should work just fine. Feel free to change "/bn" to whatever you want to use if you don't like /bn.