Have py command send strings except on client_raw flag. Resolve #3245

This commit is contained in:
Griatch 2023-08-06 20:16:54 +02:00
parent 49b98d5d53
commit 28179a9c0f
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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)