mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 22:17:17 +02:00
Added RAW and NOMARKUP protocol options to all protocols, settable with @option. Resolves #978.
This commit is contained in:
parent
79786b7173
commit
f12c754225
6 changed files with 14 additions and 10 deletions
|
|
@ -509,8 +509,10 @@ class CmdOption(COMMAND_DEFAULT_CLASS):
|
|||
"ENCODING": validate_encoding,
|
||||
"MCCP": validate_bool,
|
||||
"MXP": validate_bool,
|
||||
"OOB": validate_bool,
|
||||
"NOMARKUP": validate_bool,
|
||||
"NOPKEEPALIVE": validate_bool,
|
||||
"OOB": validate_bool,
|
||||
"RAW": validate_bool,
|
||||
"SCREENHEIGHT": validate_size,
|
||||
"SCREENWIDTH": validate_size,
|
||||
"SCREENREADER": validate_bool,
|
||||
|
|
|
|||
|
|
@ -256,8 +256,8 @@ class SshProtocol(Manhole, session.Session):
|
|||
flags = self.protocol_flags
|
||||
xterm256 = options.get("xterm256", flags.get('XTERM256', False) if flags["TTYPE"] else True)
|
||||
useansi = options.get("ansi", flags.get('ANSI', False) if flags["TTYPE"] else True)
|
||||
raw = options.get("raw", False)
|
||||
nomarkup = options.get("nomarkup", not (xterm256 or useansi))
|
||||
raw = options.get("raw", flags.get("RAW", False))
|
||||
nomarkup = options.get("nomarkup", flags.get("NOMARKUP", not (xterm256 or useansi)))
|
||||
#echo = options.get("echo", None)
|
||||
screenreader = options.get("screenreader", flags.get("SCREENREADER", False))
|
||||
|
||||
|
|
|
|||
|
|
@ -321,8 +321,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
flags = self.protocol_flags
|
||||
xterm256 = options.get("xterm256", flags.get('XTERM256', False) if flags["TTYPE"] else True)
|
||||
useansi = options.get("ansi", flags.get('ANSI', False) if flags["TTYPE"] else True)
|
||||
raw = options.get("raw", False)
|
||||
nomarkup = options.get("nomarkup", not (xterm256 or useansi))
|
||||
raw = options.get("raw", flags.get("RAW", False))
|
||||
nomarkup = options.get("nomarkup", flags.get("NOMARKUP", not (xterm256 or useansi)))
|
||||
echo = options.get("echo", None)
|
||||
mxp = options.get("mxp", flags.get("MXP", False))
|
||||
screenreader = options.get("screenreader", flags.get("SCREENREADER", False))
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@ class WebSocketClient(Protocol, Session):
|
|||
text = to_str(text, force_string=True)
|
||||
|
||||
options = kwargs.pop("options", {})
|
||||
raw = options.get("raw", False)
|
||||
nomarkup = options.get("nomarkup", False)
|
||||
raw = options.get("raw", flags.get("RAW", False))
|
||||
nomarkup = options.get("nomarkup", flags.get("NOMARKUP", False))
|
||||
screenreader = options.get("screenreader", flags.get("SCREENREADER", False))
|
||||
prompt = options.get("send_prompt", False)
|
||||
|
||||
|
|
|
|||
|
|
@ -347,8 +347,8 @@ class WebClientSession(session.Session):
|
|||
text = utils.to_str(text, force_string=True)
|
||||
|
||||
options = kwargs.pop("options", {})
|
||||
raw = options.get("raw", False)
|
||||
nomarkup = options.get("nomarkup", False)
|
||||
raw = options.get("raw", flags.get("RAW", False))
|
||||
nomarkup = options.get("nomarkup", flags.get("NOMARKUP", False))
|
||||
screenreader = options.get("screenreader", flags.get("SCREENREADER", False))
|
||||
prompt = options.get("send_prompt", False)
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ class Session(object):
|
|||
|
||||
self.protocol_flags = {"ENCODING": "utf-8",
|
||||
"SCREENREADER":False,
|
||||
"INPUTDEBUG": False}
|
||||
"INPUTDEBUG": False,
|
||||
"RAW": False,
|
||||
"NOMARKUP": False}
|
||||
self.server_data = {}
|
||||
|
||||
# map of input data to session methods
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue