When appending something to an identifier you must use the $+ function first. $nick! wont work since this will become a totally new identifier. use $nick $+ ! which will let you evaluate $nick into the value first and then append the ! afterwards.

Your second request is not a built in feature. I suggest you create your own custom alias for this. You can simply paste this into your remote.ini and this will work wonders for you.
Code:
alias capital return $upper($left($1,1)) $+ $mid($1,2-)
Now whenever you use $nick in your messages you can use $capital($nick) and it will use the value with a capital starting letter.

As for your third request:
Code:
on *:text:!ban *:#: { 
  if ($nick !isop #) || ($me !isop #) return
  ;However you ban people I do not know. Just insert it here, probably something like " /ban # $2 " or something.
  msg # $2 was banned by $nick $+ . $iif($3,Reason: $3-,$null)
}
The first line will check for if the user writing or the bot's level in the #channel, if both aren't op then the script won't work.
The 2nd line is where you input your ban method, you probably know that better than I do.
And the 3rd line will message the channel that the target ($2) has been banned by the user ($nick) If there is anything after the target that will also be included in the message as a reason.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net