diff --git a/CHANGELOG.md b/CHANGELOG.md index c1a0f074c7..0b2d1ca233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ responses from an LLM server. - Fix: Make sure `at_server_reload` is called also on non-repeating Scripts. - Fix: Webclient was not giving a proper error when sending an unknown outputfunc to it. +- Fix: Make `py` command always send strings unless `client_raw` flag is set. - Documentation fixes. ## Evennia 2.1.0 diff --git a/evennia/commands/default/system.py b/evennia/commands/default/system.py index 92e3ea3085..e4c22664e2 100644 --- a/evennia/commands/default/system.py +++ b/evennia/commands/default/system.py @@ -239,7 +239,11 @@ def _run_code_snippet( if ret is None: return - elif isinstance(ret, tuple): + + if not client_raw: + ret = str(ret) + + if isinstance(ret, tuple): # we must convert here to allow msg to pass it (a tuple is confused # with a outputfunc structure) ret = str(ret)