Ok, here's the problem I was having that I wanted to check the archives for... 
that doesn't seemed to have helped me much... I had installed auto 
ansi-detecting code a while back that I found here:

http://ascendantmud.net/Autoansi_code.txt

Well, it wouldn't never autodetect my ansi w/ windows telnet or with putty, 
both of which will support it, so I decided to go get zmud, which it does 
detect, and make sure it would output my color login screen correctly... it 
outputted it full of color codes instead of substituting the ansi codes and 
displaying colors... so I went into void write_to_buffer and added a line to 
convert to color codes in that function, and it worked fine... well at that 
point I tested what would happen if I just told it to output the color login 
screen even if it didn't autodetect ansi, and it showed up in color anyway, 
because my client supports color even if the code doesn't recognize that it 
does... so then I tested a few terminal types that didn't support color, and 
the screen still looked fine, it was just in black and white... now at this 
point I decided that since the auto-detect code eats a few seconds at login, 
and since non-ansi clients should still see the login screen fine if it's 
outputted with color codes (they'll just see it in black and white like 
normal)... why even have that auto-detect code installed? So I went back to the 
above mentioned page (it's been a while since install so I forgot where all the 
little pieces were) and I undid it line by line, and rearranged the connected 
calls so that upon a new descriptor, d->connected is set to CON_GET_NAME 
instead of CON_AUTO_ANSI, and it all seemed to work fine... except for one 
thing...

Problem: now upon login, d->inbuf stays empty ('\0' <repeats 1023 times>) as 
far as gdb can tell... until the first thing is typed in by the user, and at 
that point it's preceeded by a " '", so for example, when I go to login, and I 
type "velveeta" for my username, the code receives " 'velveeta" and says 
illegal name, try another... the 2nd time I type in my name it goes just fine, 
but I don't want all of my users to have to enter their name twice to login... 
so does anyone have any idea why this is happening? I checked an old backup I 
had from before I put in the autoansi code and the relevant parts seem to be 
the same... I'd just replace my comm.c w/ that older one except I've added some 
things to it since then that I don't wanna lose... and I noticed w/ a RoT 
codebase I was looking at the other day that it had the same problem at login, 
first try would always be an illegal name, second try would go through just 
fine...

This is the actual gdb value it's showing when it receives input for the first 
time on CON_GET_NAME...

1: d->inbuf = "ÿû\037ÿû ÿû\030ÿû'ÿý\001ÿû\003ÿý\003velveeta\r\n", '\0' <repeats 
992 times>

and the isascii function weeds away everything except the space and the 
apostrophe in that line of garbage, and then my name, so it ends up as 
" 'velveeta"... any help from some of you gurus would be appreciated, 
especially since I know very little about the actual socket programming...

Richard Lindsey


Reply via email to