MOO-cows Mailing List Archive


Re: silent passwords

On Tue, 16 Jul 1996, David Channon wrote:

>         We are setting up a small moo for a study in colaborative
>         electronic workplace. It has been requested that we have a password
>         (connection etc) that will not echo/display the password when
>         the user logs in or changes the password. I connot see how this
>         can be done without client knowledge (a colleage claims it can 
>         be done but does not have any details) - Am I missing something?

Yes, it CAN be done.
I figured out the basic method with the help of the people at du moo 
(  The system was first developed by Alex Stewart.  I will 
only give your the basic layout.  The programming is up to you (that's 
what they made ME do).  Anyway... on with the show:

Problem:  Every line that a user types in before login is treated as a 
command.  Therefore, we can't just do a read.  Here's where we defeat that:

1) Change connect to accept 1-2 args.  If 2, log the person in normally.  
If 1 do the following:
turn echoing off with set_connection_option
add an element to a prop on $login called... let's say... con_waiting.  The 
list conatains the con_waiting is a list of lists (or a 2d array for).  
The format is this: {{player#, args[1] (the req name)}, {#, name}...}

2) change the $login:parse_command to check the following:
if the command doesn't match (it won't since it's the password) do this:
if the player # is in the list on $login.con_waiting then:
get the name
take the element off con_waiting
set echoing back on
and return: "connect <namefromconwaiting> <commandtobeparsed>"
if player# isn't in con_waiting return $bogus_command

that'll do it... any further questions can be asked of me directly at:

Belgarath (archwiz mvmoo)


Home | Subject Index | Thread Index