Do you have my BlasBot.mrc script and SReject's JSONForMirc.mrc scripts loaded? That script is designed to be used with both of those. If you have no use for all the other stuff in BlasBot.mrc, you can just use the $twitch_name alias from it. You'll still need SReject's JSONForMirc.mrc script for the actual JSON parsing that is required with the $twitch_name alias.

If you don't want/need BlasBot.mrc, just paste this $twitch_name alias into your script:
Code:
alias twitch_name {
  INC %bb
  VAR %nick,%nick $IIF($1,$1,$nick)
  JSONOpen -uw twitch_name $+ %bb https://api.twitch.tv/kraken/channels/ $+ %nick
  JSONHttpHeader twitch_name $+ %bb Client-ID avm4vi7zv0xpjkpi3d4x0qzk8xbrdw8
  JSONHttpFetch twitch_name $+ %bb
  VAR %x $json(twitch_name $+ %bb, display_name).value
  JSONClose twitch_name $+ %bb
  IF ($1 == %x) RETURN %x
  ELSEIF (%x != $null) RETURN %nick
}

Then, if you don't have it already, get SReject's JSON Parser at https://github.com/SReject/JSON-For-Mirc.

The reason I use that alias for a shoutout command is because I like the feature of being able to for example type "!so blasman13" and have the bot check to make sure that the user exists first before posting the name in chat while also grabbing their proper "display name" from Twitch (eg "blasman13" would be returned as "Blasman13" with the capital B).

If anyone is wondering, the %bb alias is in there because sometimes I need to use multiple $twitch_name's on one line, and $ticks isn't useful for this (only the first name often gets returned) and I don't want to use $rand.