Open msocorcim opened 2 years ago
Looks like the problem is in telopt.c with the code starting with:
if (HAS_BIT(d->mth->comm_flags, COMM_FLAG_REMOTEECHO))
Try replacing that code block with:
if (HAS_BIT(d->mth->comm_flags, COMM_FLAG_REMOTEECHO))
{
pto = out + outlen;
skip = strlen((char *) pto);
for (cnt = 0 ; cnt < skip ; cnt++)
{
switch (pto[cnt])
{
case 8:
case 127:
pto[cnt] = '\b';
write_to_descriptor(d->descriptor, "\b \b", 3);
break;
case '\n':
write_to_descriptor(d->descriptor, "\r\n", 2);
break;
default:
if (HAS_BIT(d->mth->comm_flags, COMM_FLAG_PASSWORD))
{
write_to_descriptor(d->descriptor, "*", 1);
}
else
{
write_to_descriptor(d->descriptor, (char *) (pto + cnt), 1);
}
break;
}
}
}
Thanks! That works well with the Windows Telnet. (replaced "d->descriptor" with "d" for ROM)
On my ROM with MTH 1.5, a Windows Telnet Session (tested with Win 10 and 11) has improper echos. I tested this with BasedMUD with the same results. This doesn't affect PuTTY telnet, the Linux netkit console telnet client, or any of several mud clients tested. Our user was able to use PuTTY, so this is no big deal, but it would be nice being able to identify a Windows telnet session and to limit option negotiations to those the client can process gracefully.
Below, I'm typing the name Msocorcim.
Do you want ANSI? (Y/n) yy Ansi enabled!
THIS IS A MUD BASED ON.....
By what name do you wish to be known? MMsoMsocoMsocorcMsocorcim