For mudlet we overwrite the negotiated GA value

Suppress GA
Activate the NOPROMPTGOAHEAD flag so GA's only sent on prompts
This commit is contained in:
Ben Longden 2021-04-26 12:29:05 +01:00
parent 61d42d91d4
commit 9b749d16a6
2 changed files with 2 additions and 0 deletions

View file

@ -252,6 +252,7 @@ class TestTelnet(TwistedTestCase):
self.assertTrue(self.proto.protocol_flags["XTERM256"])
self.assertEqual(self.proto.protocol_flags["CLIENTNAME"], "MUDLET")
self.assertTrue(self.proto.protocol_flags["FORCEDENDLINE"])
self.assertTrue(self.proto.protocol_flags["NOGOAHEAD"])
self.assertFalse(self.proto.protocol_flags["NOPROMPTGOAHEAD"])
self.proto.dataReceived(b"".join([IAC, SB, TTYPE, IS, b"XTERM", IAC, SE]))
self.proto.dataReceived(b"".join([IAC, SB, TTYPE, IS, b"MTTS 137", IAC, SE]))

View file

@ -120,6 +120,7 @@ class Ttype(object):
# supports xterm256 stably since 1.1 (2010?)
xterm256 = clientname.split("MUDLET", 1)[1].strip() >= "1.1"
# Mudlet likes GA's on a prompt line for the prompt trigger to match.
self.protocol.protocol_flags["NOGOAHEAD"] = True
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = False
if (