From c413eeb0260e143ada3f2c1915bda07602e06fa1 Mon Sep 17 00:00:00 2001 From: Tim Myers Date: Wed, 18 Sep 2019 17:37:56 -0500 Subject: Also print help commands to chat for server terminal (#8869) --- builtin/common/chatcommands.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'builtin/common/chatcommands.lua') diff --git a/builtin/common/chatcommands.lua b/builtin/common/chatcommands.lua index 71204657c..52edda659 100644 --- a/builtin/common/chatcommands.lua +++ b/builtin/common/chatcommands.lua @@ -77,6 +77,13 @@ local function do_help_cmd(name, param) end table.sort(cmds) return true, gettext("Available commands:").."\n"..table.concat(cmds, "\n") + elseif INIT == "game" and param == "privs" then + local privs = {} + for priv, def in pairs(core.registered_privileges) do + privs[#privs + 1] = priv .. ": " .. def.description + end + table.sort(privs) + return true, "Available privileges:\n"..table.concat(privs, "\n") else local cmd = param local def = core.registered_chatcommands[cmd] -- cgit v1.2.3