From da7a71e6dd620259e3077ffb81874b49d586b8cf Mon Sep 17 00:00:00 2001 From: Simon Vermeersch Date: Sun, 15 Jan 2017 12:01:30 +0100 Subject: [PATCH] Implement the "gag prompt" option --- .../web/webclient/static/webclient/js/webclient_gui.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/evennia/web/webclient/static/webclient/js/webclient_gui.js b/evennia/web/webclient/static/webclient/js/webclient_gui.js index d0a6297822..67aa325fec 100644 --- a/evennia/web/webclient/static/webclient/js/webclient_gui.js +++ b/evennia/web/webclient/static/webclient/js/webclient_gui.js @@ -15,6 +15,8 @@ (function () { "use strict" + +var options = {}; // // GUI Elements // @@ -235,6 +237,11 @@ function onPrompt(args, kwargs) { .addClass("out") .html(args[0]); doWindowResize(); + + // also display the prompt in the output window if gagging is disabled + if (("gagprompt" in options) && (!options["gagprompt"])) { + onText(args, kwargs); + } } // Called when the user logged in @@ -244,6 +251,8 @@ function onLoggedIn() { // Called when a setting changed function onGotOptions(args, kwargs) { + options = kwargs; + $.each(kwargs, function(key, value) { var elem = $("[data-setting='" + key + "']"); if (elem.length === 0) {