[DGD] MODE_NOECHO newline

bart at wotf.org bart at wotf.org
Wed Aug 3 15:37:15 CEST 2016


Here it seems to work quite as expected, but that is with 'regular' linux and
freebsd telnet clients.

This is on dgd 1.5.3 (pull and compile on march 17th this year, I can test on
a later version if desired), but also verified on an 1.4.1, 1.3 and 1.2.157,
all with either network patches installed or network extensions enabled. I
don't think the network extensions should matter for this.

Relevant bit of lpc code producing output (slightly modified user object based
on the one from gurbalib):

         send_message(0);
         send_message("\nA test message 1\n");
         send_message("A test message 2\n");
         send_message("Enter your password: ");
         shell->input_to_object(this_object(), "input_old_passwd");

The output from a regular (linux) telnet session

bart at numenor:~> script lpcdb-test.txt
Script started, file is lpcdb-test.txt
bart at numenor:~> telnet numenor 5000   
Trying 127.0.0.2...                   
Connected to numenor.                 
Escape character is '^]'.             
lpcdb v1.0 alpha on DGD 1.5.3.        

lpcdb test/demo environment

This is Aidil's lpcdb test environment.
Please note that all actions here will be logged!


Please enter your name : aidil

A test message 1
A test message 2
Enter your password: [Aidil at lpcdb-dev]aidil:/users/aidil>

Welcome to Aidil's lpcdb test environment.

Output captured by script:
Script started on Wed 03 Aug 2016 03:22:48 PM CEST
^[]2;bart at numenor:~^G^[]1;numenor^G^[[?1034hbart at numenor:~> telnet numenor 5000^M
Trying 127.0.0.2...^M^M
Connected to numenor.^M^M
Escape character is '^]'.^M^M
lpcdb v1.0 alpha on DGD 1.5.3.^M
^M
lpcdb test/demo environment^M
^M
This is Aidil's lpcdb test environment.^M
Please note that all actions here will be logged!^M
^M
^M^M
Please enter your name : aidil^M
^M
A test message 1^M
A test message 2^M
Enter your password:
[^[[1m^[[33mAidil at lpcdb-dev^[[0m]^[[1m^[[32maidil^[[0m:^[[1m^[[37m/users/aidil^[[0m>^[[0m
^M
^M
Welcome to Aidil's lpcdb test environment.^M
^M

For all I can tell this is behaving quite as it should.
ps, testing with a 'real' mud client may not show well what is happening, as
those tend to handle user input slightly differently from a 'real' telnet client.

Bart.

On Mon, 01 Aug 2016 16:37:06 +0200, Felix A. Croes wrote
> Blain <blain20 at gmail.com> wrote:
> 
> > When I switch to noecho mode, the lines following a newline are severely
> > indented.  To fix it, I have to replace \n with \r\n before sending it to
> > the user.  This doesn't happen in echo mode.  Any ideas on where to start
> > looking?  Kernel code and my code seem fine so far.
> 
> That's odd, because DGD will automatically send \r\n for every \n on 
> a telnet connection.  The first step would be to run a session using 
> 'script', to verify that correct output is produced.
> 
> Regards,
> Felix Croes
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd


--
http://www.flickr.com/photos/mrobjective/
http://www.om-d.org/




More information about the DGD mailing list