mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Implement the "gag prompt" option
This commit is contained in:
parent
9efed33fb5
commit
da7a71e6dd
1 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue