Skip to content
Snippets Groups Projects
Commit c7d569b8 authored by red-001's avatar red-001 Committed by paramat
Browse files

Chat commands: Trim whitespaces from input of `/privs` command

parent 91250c10
No related branches found
No related tags found
No related merge requests found
......@@ -147,11 +147,12 @@ core.register_chatcommand("help", {
core.register_chatcommand("privs", {
params = "<name>",
description = "print out privileges of player",
func = function(name, param)
param = (param ~= "" and param or name)
return true, "Privileges of " .. param .. ": "
func = function(caller, param)
param = param:trim()
local name = (param ~= "" and param or caller)
return true, "Privileges of " .. name .. ": "
.. core.privs_to_string(
core.get_player_privs(param), ' ')
core.get_player_privs(name), ' ')
end,
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment