That it worked correctly with the id $nick, the entry in the tab "Users" with access levels should look like this:
Code
10:colt
2:Gurth
2:Peru1987

In your case, it is correct to use the identifier $address with records in the form of addresses.

Here's of how I did it using the example of a user with the nickname "user":
Code
2:user!*@*

Script code:
Code
on *:JOIN:#:{
  if ($level($address($nick,5)) isnum 2-4) {
    .msg $chan $+([,$nick = $level($address($nick,5)),]) - Welcome $nick to this channel.
  }
}




🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples