You can make custom identifiers with aliases, e.g.
Code:
alias hello {
  join #channelthatwontexist
  return hi
}

//echo -a $hello

When you call an alias this way all the commands in it are performed (just as if you had typed /hello).

From the mIRC helpfile:
$scid

If you specify a property which is an identifier, it returns the value of that identifier for that connection. This also works for custom identifiers.


So typing //echo -a $scid($cid).hello will also call the hello alias and perform all the commands in it.