mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
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")
|
||||
if not line.endswith(b"\r\n") and self.protocol_flags.get("FORCEDENDLINE", True):
|
||||
line += b"\r\n"
|
||||
if not self.protocol_flags.get("NOGOAHEAD", True):
|
||||
line += IAC + GA
|
||||
return self.transport.write(mccp_compress(self, line))
|
||||
|
||||
# Session hooks
|
||||
|
|
@ -440,7 +438,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
prompt = mxp_parse(prompt)
|
||||
prompt = to_bytes(prompt, self)
|
||||
prompt = prompt.replace(IAC, IAC + IAC).replace(b"\n", b"\r\n")
|
||||
prompt += IAC + GA
|
||||
if not self.protocol_flags.get("NOGOAHEAD", True):
|
||||
prompt += IAC + GA
|
||||
self.transport.write(mccp_compress(self, prompt))
|
||||
else:
|
||||
if echo is not None:
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class Ttype(object):
|
|||
if clientname.startswith("MUDLET"):
|
||||
# supports xterm256 stably since 1.1 (2010?)
|
||||
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++"):
|
||||
self.protocol.protocol_flags["FORCEDENDLINE"] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue