From 9bb0c77a74cf4544eee4b7570898224cd6793e8a Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 24 Oct 2020 10:54:07 +0200 Subject: [PATCH] Include webclient info in protocol_flags --- CHANGELOG.md | 1 + evennia/server/portal/webclient.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce2de2b9d..54a08b5941 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ without arguments starts a full interactive Python console. Default `EvMenu.msg` sends with OOB type="menu" for use with OOB and webclient pane-redirects. - New EvMenu templating system for quickly building simpler EvMenus without as much code. - Add `Command.client_height()` method to match existing `.client_width` (stricako) +- Include more Web-client info in `session.protocol_flags`. ## Evennia 0.9 (2018-2019) diff --git a/evennia/server/portal/webclient.py b/evennia/server/portal/webclient.py index d5908a706c..5ccf654f4f 100644 --- a/evennia/server/portal/webclient.py +++ b/evennia/server/portal/webclient.py @@ -119,6 +119,10 @@ class WebSocketClient(WebSocketServerProtocol, Session): self.sessid = old_session.sessid self.sessionhandler.disconnect(old_session) + self.protocol_flags["CLIENTNAME"] = "Evennia Webclient (websocket)" + self.protocol_flags["UTF-8"] = True + self.protocol_flags["OOB"] = True + # watch for dead links self.transport.setTcpKeepAlive(1) # actually do the connection