Well as it would likely be a lua script those functions would provide the values you'd need. Mudlet does not use
$ to identify variables like a shell script (or like TinTin++ and then ZMud which copied it originally). I would not be minded to actually furnish a password to the lua system but then that might make it tricky to include it in a longer string - so I'd have to change the putative
sendPassword() function to be
sendPassword([optonal before text], [optional after text]) but that would be achievable and reasonable,
I think.
Having a special syntax, format, whatever just to log in does not seem sensible to me - however a (
event) script that is run when the event system puts out the
sysConnectionEvent is completly within the scope and capabilities of the existing infrastructure...