Mudlet likes GA's for prompts
Don't sent GA on every message (not everything is a prompt) Do enforce line endings for mudlet, it wont display anything without it.
This commit is contained in:
parent
e1b4e1ae68
commit
359842d554
2 changed files with 3 additions and 4 deletions
|
|
@ -337,8 +337,6 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
||||||
line = line.replace(b"\n", b"\r\n")
|
line = line.replace(b"\n", b"\r\n")
|
||||||
if not line.endswith(b"\r\n") and self.protocol_flags.get("FORCEDENDLINE", True):
|
if not line.endswith(b"\r\n") and self.protocol_flags.get("FORCEDENDLINE", True):
|
||||||
line += b"\r\n"
|
line += b"\r\n"
|
||||||
if not self.protocol_flags.get("NOGOAHEAD", True):
|
|
||||||
line += IAC + GA
|
|
||||||
return self.transport.write(mccp_compress(self, line))
|
return self.transport.write(mccp_compress(self, line))
|
||||||
|
|
||||||
# Session hooks
|
# Session hooks
|
||||||
|
|
@ -440,6 +438,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
||||||
prompt = mxp_parse(prompt)
|
prompt = mxp_parse(prompt)
|
||||||
prompt = to_bytes(prompt, self)
|
prompt = to_bytes(prompt, self)
|
||||||
prompt = prompt.replace(IAC, IAC + IAC).replace(b"\n", b"\r\n")
|
prompt = prompt.replace(IAC, IAC + IAC).replace(b"\n", b"\r\n")
|
||||||
|
if not self.protocol_flags.get("NOGOAHEAD", True):
|
||||||
prompt += IAC + GA
|
prompt += IAC + GA
|
||||||
self.transport.write(mccp_compress(self, prompt))
|
self.transport.write(mccp_compress(self, prompt))
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class Ttype(object):
|
||||||
if clientname.startswith("MUDLET"):
|
if clientname.startswith("MUDLET"):
|
||||||
# supports xterm256 stably since 1.1 (2010?)
|
# supports xterm256 stably since 1.1 (2010?)
|
||||||
xterm256 = clientname.split("MUDLET", 1)[1].strip() >= "1.1"
|
xterm256 = clientname.split("MUDLET", 1)[1].strip() >= "1.1"
|
||||||
self.protocol.protocol_flags["FORCEDENDLINE"] = False
|
self.protocol.protocol_flags["FORCEDENDLINE"] = True
|
||||||
|
|
||||||
if clientname.startswith("TINTIN++"):
|
if clientname.startswith("TINTIN++"):
|
||||||
self.protocol.protocol_flags["FORCEDENDLINE"] = True
|
self.protocol.protocol_flags["FORCEDENDLINE"] = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue