diff --git a/evennia/commands/default/help.py b/evennia/commands/default/help.py index 6f09f98068..a79fc0a61b 100644 --- a/evennia/commands/default/help.py +++ b/evennia/commands/default/help.py @@ -267,7 +267,7 @@ class CmdHelp(Command): return # no exact matches found. Just give suggestions. - self.msg(self.format_help_entry("", "No help entry found for '%s'" % query, None, suggested=suggestions)) + self.msg((self.format_help_entry("", "No help entry found for '%s'" % query, None, suggested=suggestions), {"type": "help"})) def _loadhelp(caller): diff --git a/evennia/server/inputfuncs.py b/evennia/server/inputfuncs.py index 9c7098a7db..3715bb53fe 100644 --- a/evennia/server/inputfuncs.py +++ b/evennia/server/inputfuncs.py @@ -436,9 +436,12 @@ def webclient_options(session, *args, **kwargs): """ account = session.account - clientoptions = settings.WEBCLIENT_OPTIONS.copy() - storedoptions = account.db._saved_webclient_options or {} - clientoptions.update(storedoptions) + clientoptions = account.db._saved_webclient_options + if not clientoptions: + # No saved options for this account, copy and save the default. + account.db._saved_webclient_options = settings.WEBCLIENT_OPTIONS.copy() + # Get the _SaverDict created by the database. + clientoptions = account.db._saved_webclient_options # The webclient adds a cmdid to every kwargs, but we don't need it. try: @@ -448,7 +451,8 @@ def webclient_options(session, *args, **kwargs): if not kwargs: # No kwargs: we are getting the stored options - session.msg(webclient_options=clientoptions) + # Convert clientoptions to regular dict for sending. + session.msg(webclient_options=dict(clientoptions)) # Create a monitor. If a monitor already exists then it will replace # the previous one since it would use the same idstring @@ -461,5 +465,3 @@ def webclient_options(session, *args, **kwargs): # kwargs provided: persist them to the account object for key, value in kwargs.iteritems(): clientoptions[key] = value - - account.db._saved_webclient_options = clientoptions diff --git a/evennia/web/webclient/static/webclient/css/webclient.css b/evennia/web/webclient/static/webclient/css/webclient.css index fff9f29390..1c94a1f9fd 100644 --- a/evennia/web/webclient/static/webclient/css/webclient.css +++ b/evennia/web/webclient/static/webclient/css/webclient.css @@ -31,6 +31,8 @@ strong {font-weight: bold;} div {margin:0px;} +.hidden { display: none; } + /* Utility messages (green) */ .sys { color: #0f0 } diff --git a/evennia/web/webclient/static/webclient/js/webclient_gui.js b/evennia/web/webclient/static/webclient/js/webclient_gui.js index c1af719f72..ba657858d9 100644 --- a/evennia/web/webclient/static/webclient/js/webclient_gui.js +++ b/evennia/web/webclient/static/webclient/js/webclient_gui.js @@ -289,6 +289,7 @@ function onPrompt(args, kwargs) { // Called when the user logged in function onLoggedIn() { + $('#optionsbutton').removeClass('hidden'); Evennia.msg("webclient_options", [], {}); } @@ -323,6 +324,8 @@ function onSilence(cmdname, args, kwargs) {} // Handle the server connection closing function onConnectionClose(conn_name, evt) { + $('#optionsbutton').addClass('hidden'); + closePopup("#optionsdialog"); onText(["The connection was closed or lost."], {'cls': 'err'}); } diff --git a/evennia/web/webclient/templates/webclient/webclient.html b/evennia/web/webclient/templates/webclient/webclient.html index 7be315f3fa..1c641bffb0 100644 --- a/evennia/web/webclient/templates/webclient/webclient.html +++ b/evennia/web/webclient/templates/webclient/webclient.html @@ -11,7 +11,7 @@
- +
@@ -48,4 +48,3 @@
{% endblock %} -