diff --git a/evennia/server/inputfuncs.py b/evennia/server/inputfuncs.py index 88e667f924..5c43a1cc7b 100644 --- a/evennia/server/inputfuncs.py +++ b/evennia/server/inputfuncs.py @@ -421,58 +421,62 @@ def unmonitor(session, *args, **kwargs): """ kwargs["stop"] = True monitor(session, *args, **kwargs) - -def _on_webclient_setting_change(**kwargs): + + +def _on_webclient_options_change(**kwargs): """ - Called when the settings stored on the player changes. + Called when the webclient options stored on the player changes. Inform the interested clients of this change. """ session = kwargs["session"] obj = kwargs["obj"] - fieldname = kwargs["fieldname"] - clientsettings = _GA(obj, fieldname) - - session.msg(webclient_settings=clientsettings) + fieldname = kwargs["fieldname"] + clientoptions = _GA(obj, fieldname) -def webclient_settings(session, *args, **kwargs): + session.msg(webclient_options=clientoptions) + + +def webclient_options(session, *args, **kwargs): """ - Handles returning and monitoring stored settings relatede to the webclient. - + Handles retrieving and changing of options related to the webclient. + + If kwargs is empty (or contains just a "cmdid"), the saved options will be + sent back to the session. + A monitor handler will be created to inform the client of any future options + that changes. + + If kwargs is not empty, the key/values stored in there will be persisted + to the player object. + Kwargs: - monitor (bool): If this is true, starts monitoring the settings for - changes too +