1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Also print help commands to chat for server terminal (#8869)

This commit is contained in:
Tim Myers 2019-09-18 17:37:56 -05:00 committed by sfan5
parent 6a7f5c0985
commit c413eeb026
2 changed files with 18 additions and 3 deletions

View file

@ -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]