MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: My wish: built-in prompt support



Ahn Jin-su wrote:
> 
> I think there's some need for built-in prompt support, for various reasons
> (printing stat for rpg MOO, verb name and line number for in-MOO editor,
> for example).
> 
> I wrote patches for it several times myself, for the server is continuosly
> evolving, and the last one was completely rewritten from scratch and finished
> last night. It seems I wrote the patches for every versions of server since
> 1.7.8p4. (sigh)

1.8.0 allows you to output a 'prompt' without a server hack.

If you

set_connection_option(player,"binary",1);
notify(player,"This is a prompt>");
set_connection_option(player,"binary",0);

When connections are in "binary" mode, notify() does not automatically
append an end-of-line character.  The result of the above code is the
player will see "This is a prompt>" and the cursor will be located
immediately after the ">", not on a new line.

Getting the server to print the prompt after every command typed is not
difficult.


References:

Home | Subject Index | Thread Index