You can use the ON Join event for that matter.
ON [color:red]!*:Join:
#channel: if (
Nick_banned == $nick) { ban -k $chan $nick Banned nick }[/color]
This will check if the nickname that just joined matches the
banned nick. If it does, it will kick and ban it. Change the
orange part for the nick you wish to ban. The
red ! means that the script will *not* respond if YOU are the one joining. You must change the
#channel for the channel name(s) you want the script to act upon (if it's more than 1, separate them with a comma [,]).
If you would like to ban the person for a period of time, change
ban -k $chan $nick Banned nick for
ban -kuN $chan $nick Banned nick - where
N is the time you want the ban to last
in seconds. Note that
"Banned nick" is the kick message and you can chage that for the message you wish.
I hope this can help
Zyzzyx.
Edit: for more info about it, type /help on join while in mIRC.
Edit2: the -k part means that the script will also kick the person. If you don't want that, remove the k. Note that, if you are using the timed ban (-uN), you still need the - sign.