Merge pull request #3186 from volundmush/truecolor

Adding client-side flags for supporting TRUECOLOR and extending MTTS...
This commit is contained in:
Griatch 2023-05-27 10:32:39 +02:00 committed by GitHub
commit 0fa705d6ba
3 changed files with 11 additions and 0 deletions

View file

@ -127,6 +127,10 @@ class SshProtocol(Manhole, _BASE_SESSION_CLASS):
self.width = width
self.height = height
# Set color defaults
for color in ("ANSI", "XTERM256", "TRUECOLOR"):
self.protocol_flags[color] = True
# initialize the session
client_address = self.getClientAddress()
client_address = client_address.host if client_address else None

View file

@ -19,6 +19,10 @@ SEND = bytes([1]) # b"\x01"
# terminal capabilities and their codes
MTTS = [
(2048, "SSL"),
(1024, "MSLP"),
(512, "MNES"),
(256, "TRUECOLOR"),
(128, "PROXY"),
(64, "SCREENREADER"),
(32, "OSC_COLOR_PALETTE"),

View file

@ -131,6 +131,9 @@ class WebSocketClient(WebSocketServerProtocol, _BASE_SESSION_CLASS):
self.protocol_flags["CLIENTNAME"] = f"Evennia Webclient (websocket{browserstr})"
self.protocol_flags["UTF-8"] = True
self.protocol_flags["OOB"] = True
self.protocol_flags["TRUECOLOR"] = True
self.protocol_flags["XTERM256"] = True
self.protocol_flags["ANSI"] = True
# watch for dead links
self.transport.setTcpKeepAlive(1)