mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fix PEP8 in PR #2390
This commit is contained in:
parent
e306b2ba27
commit
76c1e09c84
3 changed files with 7 additions and 3 deletions
|
|
@ -40,7 +40,9 @@ class SuppressGA(object):
|
|||
self.protocol = protocol
|
||||
|
||||
self.protocol.protocol_flags["NOGOAHEAD"] = True
|
||||
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = True # Used to send a GA after a prompt line only, set in TTYPE (per client)
|
||||
self.protocol.protocol_flags[
|
||||
"NOPROMPTGOAHEAD"
|
||||
] = True # Used to send a GA after a prompt line only, set in TTYPE (per client)
|
||||
# tell the client that we prefer to suppress GA ...
|
||||
self.protocol.will(SUPPRESS_GA).addCallbacks(self.will_suppress_ga, self.wont_suppress_ga)
|
||||
|
||||
|
|
|
|||
|
|
@ -440,7 +440,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")
|
||||
if not self.protocol_flags.get("NOPROMPTGOAHEAD", self.protocol_flags.get("NOGOAHEAD", True)):
|
||||
if not self.protocol_flags.get("NOPROMPTGOAHEAD",
|
||||
self.protocol_flags.get("NOGOAHEAD", True)):
|
||||
prompt += IAC + GA
|
||||
self.transport.write(mccp_compress(self, prompt))
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -119,7 +119,8 @@ class Ttype(object):
|
|||
if clientname.startswith("MUDLET"):
|
||||
# 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, if it's not wanting NOGOAHEAD.
|
||||
# Mudlet likes GA's on a prompt line for the prompt trigger to
|
||||
# match, if it's not wanting NOGOAHEAD.
|
||||
if not self.protocol.protocol_flags["NOGOAHEAD"]:
|
||||
self.protocol.protocol_flags["NOGOAHEAD"] = True
|
||||
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue