It seems you are on irc.twitch.tv which is using registered username/nickname. Unregisterd username/nickname is not allowed. So that's okay.

About $2, you can just remove it from you code, because $2 is always $null on join event.

Code:
on !*:join:*:{
  if ((%floodwelcome) || ($($+(%,floodwelcome.,$nick),2))) { return }
  set -u21600 %floodwelcome. $+ $nick On
  if (%name. [ $+ [ $nick ] ] == $null) {
    var %welcome = $rand(1,6)
    if (%welcome == 1) msg $chan $nick $+ , Welcome to the stream! Be welcome!
    if (%welcome == 2) msg $chan Welcome to the stream $nick $+ ! Be welcome!
    if (%welcome == 3) msg $chan $nick Welcome! Be welcome!
    if (%welcome == 4) msg $chan Welcome $nick $+ ! Be welcome!
    if (%welcome == 5) msg $chan Good to see you $nick $+ , Welcome to the stream!
    if (%welcome == 6) msg $chan $nick $+ , good to see you! Welcome to the stream!
  }
  else {
    var %welcome = $rand(1,6)
    if (%welcome == 1) msg $chan %name. [ $+ [ $nick ] ] $+ , Welcome to the stream! Be welcome!
    if (%welcome == 2) msg $chan Welcome to the stream %name. [ $+ [ $nick ] ] $+ ! Be welcome!
    if (%welcome == 3) msg $chan %name. [ $+ [ $nick ] ] Welcome! Be welcome!
    if (%welcome == 4) msg $chan Welcome %name. [ $+ [ $nick ] ] $+ ! Be welcome!
    if (%welcome == 5) msg $chan Good to see you %name. [ $+ [ $nick ] ] $+ , Welcome to the stream!
    if (%welcome == 6) msg $chan %name. [ $+ [ $nick ] ] $+ , good to see you! Welcome to the stream!
  }
}