mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Made also the prompt parsed for MXP tags and added html parsing for the prompt in the webclient. See #599.
This commit is contained in:
parent
3eb347a076
commit
b8dfce9cef
2 changed files with 4 additions and 2 deletions
|
|
@ -258,6 +258,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
if prompt:
|
||||
# Send prompt separately
|
||||
prompt = ansi.parse_ansi(_RE_N.sub("", prompt) + "{n", strip_ansi=nomarkup, xterm256=xterm256)
|
||||
if mxp:
|
||||
prompt = mxp_parse(prompt)
|
||||
prompt = prompt.replace(IAC, IAC + IAC).replace('\n', '\r\n')
|
||||
prompt += IAC + GA
|
||||
self.transport.write(mccp_compress(self, prompt))
|
||||
|
|
|
|||
|
|
@ -122,10 +122,10 @@ class WebSocketClient(Protocol, Session):
|
|||
oobstruct = self.sessionhandler.oobstruct_parser(kwargs.pop("oob"))
|
||||
#print "oob data_out:", "OOB" + json.dumps(oobstruct)
|
||||
self.sendLine("OOB" + json.dumps(oobstruct))
|
||||
if "prompt" in kwargs:
|
||||
self.sendLine("PROMPT" + kwargs["prompt"])
|
||||
raw = kwargs.get("raw", False)
|
||||
nomarkup = kwargs.get("nomarkup", False)
|
||||
if "prompt" in kwargs:
|
||||
self.sendLine("PROMPT" + parse_html(kwargs["prompt"], strip_ansi=nomarkup))
|
||||
if raw:
|
||||
self.sendLine(text)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue