No need for that. You can already use mirc built in ban alias for that.
you made a alias to: /.ban user
Solo:
1) Your script is not what the author mainly wanted.
2) Your alias do not check if the user is on the specefied channel
3) Your alias do not check if a name ($2) was input.
4) Your code will not handle if you just input a nickname. Like /.ban Lindrian