diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-08-06 19:30:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-06 19:30:18 +0100 |
commit | 8e757859d6a6bf6482480904e8485e9344e567ab (patch) | |
tree | 3304aa9393a753b85143389c6f6ffec990cfa12e /builtin/common/information_formspecs.lua | |
parent | 8da35c22d1c8933090330b2f3c44b4cf2c6e6760 (diff) | |
download | minetest-8e757859d6a6bf6482480904e8485e9344e567ab.tar.xz |
Add luacheck to check builtin (#7895)
Diffstat (limited to 'builtin/common/information_formspecs.lua')
-rw-r--r-- | builtin/common/information_formspecs.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/common/information_formspecs.lua b/builtin/common/information_formspecs.lua index 6a0b00bbc..10fe37b8f 100644 --- a/builtin/common/information_formspecs.lua +++ b/builtin/common/information_formspecs.lua @@ -31,7 +31,6 @@ local mod_cmds = {} local function load_mod_command_tree() mod_cmds = {} - local check_player_privs = core.check_player_privs for name, def in pairs(core.registered_chatcommands) do mod_cmds[def.mod_origin] = mod_cmds[def.mod_origin] or {} local cmds = mod_cmds[def.mod_origin] @@ -86,8 +85,8 @@ end local function build_privs_formspec(name) local privs = {} - for name, def in pairs(core.registered_privileges) do - privs[#privs + 1] = { name, def } + for priv_name, def in pairs(core.registered_privileges) do + privs[#privs + 1] = { priv_name, def } end table.sort(privs, function(a, b) return a[1] < b[1] end) @@ -137,7 +136,7 @@ help_command.func = function(name, param) if param == "" or param == "all" then core.show_formspec(name, "__builtin:help_cmds", build_chatcommands_formspec(name)) - return + return end return old_help_func(name, param) |