aboutsummaryrefslogtreecommitdiff
path: root/builtin/common/information_formspecs.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-06-02 20:54:02 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-06-02 20:54:02 +0200
commit827b9f8d7054158b058679999d77c1345162a293 (patch)
treeb03741002579b03d3657c1e496e73993e4070fa9 /builtin/common/information_formspecs.lua
parent3ff3103e98b350712543f926c429ab339700e252 (diff)
parent9fc018ded10225589d2559d24a5db739e891fb31 (diff)
downloaddragonfireclient-827b9f8d7054158b058679999d77c1345162a293.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'builtin/common/information_formspecs.lua')
-rw-r--r--builtin/common/information_formspecs.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/common/information_formspecs.lua b/builtin/common/information_formspecs.lua
index 3405263bf..1445a017c 100644
--- a/builtin/common/information_formspecs.lua
+++ b/builtin/common/information_formspecs.lua
@@ -22,7 +22,6 @@ local LIST_FORMSPEC_DESCRIPTION = [[
local F = core.formspec_escape
local S = core.get_translator("__builtin")
-local check_player_privs = core.check_player_privs
-- CHAT COMMANDS FORMSPEC
@@ -58,10 +57,11 @@ local function build_chatcommands_formspec(name, sel, copy)
.. "any entry in the list.").. "\n" ..
S("Double-click to copy the entry to the chat history.")
+ local privs = core.get_player_privs(name)
for i, data in ipairs(mod_cmds) do
rows[#rows + 1] = COLOR_BLUE .. ",0," .. F(data[1]) .. ","
for j, cmds in ipairs(data[2]) do
- local has_priv = check_player_privs(name, cmds[2].privs)
+ local has_priv = privs[cmds[2].privs]
rows[#rows + 1] = ("%s,1,%s,%s"):format(
has_priv and COLOR_GREEN or COLOR_GRAY,
cmds[1], F(cmds[2].params))