Fix negative offsets not being supported by container[]
[oweals/minetest.git] / builtin / common / chatcommands.lua
index e8955c6b41405cd1074f172dd3c4e30c3f1768f6..71204657c976e09535f1417caed0c0c7ebea8296 100644 (file)
@@ -77,13 +77,6 @@ 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]
@@ -97,7 +90,7 @@ end
 
 if INIT == "client" then
        core.register_chatcommand("help", {
-               params = gettext("[all/<cmd>]"),
+               params = gettext("[all | <cmd>]"),
                description = gettext("Get help for commands"),
                func = function(param)
                        return do_help_cmd(nil, param)
@@ -105,7 +98,7 @@ if INIT == "client" then
        })
 else
        core.register_chatcommand("help", {
-               params = "[all/privs/<cmd>]",
+               params = "[all | privs | <cmd>]",
                description = "Get help for commands or list privileges",
                func = do_help_cmd,
        })