Try using this code:
Code
alias addnick {
  if ($1) {
    var %nick $remove($1,*,!), %chars $remove($1,%nick)
    if ($left(%chars,1) == *) { echo -ag Return 1: $+(%nick,*!*@*) }
    elseif ($left(%chars,1) == !) { echo -ag Return 2: $+(%nick,!*@*) }
    else { echo -ag Return 3: $1 }
  }
}


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