From 581e491cd883c43655fdad53746dd67f1dfcf165 Mon Sep 17 00:00:00 2001 From: InspectorCaracal Date: Tue, 28 Jun 2022 21:34:14 -0600 Subject: [PATCH 1/3] copy options for each command --- evennia/server/sessionhandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/server/sessionhandler.py b/evennia/server/sessionhandler.py index 5e1bcf0830..36a4b83488 100644 --- a/evennia/server/sessionhandler.py +++ b/evennia/server/sessionhandler.py @@ -269,7 +269,7 @@ class SessionHandler(dict): rkwargs[key] = [_validate(data), {}] else: rkwargs[key] = [[_validate(data)], {}] - rkwargs[key][1]["options"] = options + rkwargs[key][1]["options"] = dict(options) return rkwargs From b4b05f55487e290743a7852b7da945b06051645d Mon Sep 17 00:00:00 2001 From: InspectorCaracal Date: Tue, 28 Jun 2022 21:44:20 -0600 Subject: [PATCH 2/3] move text to front --- evennia/server/sessionhandler.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/evennia/server/sessionhandler.py b/evennia/server/sessionhandler.py index 36a4b83488..925e190f4c 100644 --- a/evennia/server/sessionhandler.py +++ b/evennia/server/sessionhandler.py @@ -270,6 +270,11 @@ class SessionHandler(dict): else: rkwargs[key] = [[_validate(data)], {}] rkwargs[key][1]["options"] = dict(options) + # make sure that any "text" message will be processed first + # by putting it at the beginning + if "text" in rkwargs: + text = rkwargs.pop("text") + rkwargs = { "text": text } | rkwargs return rkwargs From d7d4ccfe4329c1f4f9788808d4c1ad6693850859 Mon Sep 17 00:00:00 2001 From: InspectorCaracal <51038201+InspectorCaracal@users.noreply.github.com> Date: Sun, 3 Jul 2022 20:25:53 -0600 Subject: [PATCH 3/3] change to move prompt --- evennia/server/sessionhandler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/evennia/server/sessionhandler.py b/evennia/server/sessionhandler.py index 925e190f4c..d116fef8cb 100644 --- a/evennia/server/sessionhandler.py +++ b/evennia/server/sessionhandler.py @@ -270,11 +270,11 @@ class SessionHandler(dict): else: rkwargs[key] = [[_validate(data)], {}] rkwargs[key][1]["options"] = dict(options) - # make sure that any "text" message will be processed first - # by putting it at the beginning - if "text" in rkwargs: - text = rkwargs.pop("text") - rkwargs = { "text": text } | rkwargs + # make sure that any "prompt" message will be processed last + # by moving it to the end + if "prompt" in rkwargs: + prompt = rkwargs.pop("prompt") + rkwargs["prompt"] = prompt return rkwargs