/help /ban
-k is for a kick
-uN is for automatically unbanning in N seconds
For unbanning, the command in the script would be:
mode $chan -b $2-
Note that you would need to specify the correct ban address to unban the person.
As for your question about it showing the "reason why" when kicking, look at the usage examples I gave you. As long as you type the reason in there, it will do so.