@@ -106,28 +106,28 @@ core.register_chatcommand("privs", {
106
106
end,
107
107
})
108
108
109
- core.register_chatcommand("hasprivs ", {
109
+ core.register_chatcommand("haspriv ", {
110
110
params = "<privilege>",
111
111
description = "Return list of all online players with privilege.",
112
112
privs = {basic_privs = true},
113
113
func = function(caller, param)
114
114
param = param:trim()
115
115
if param == "" then
116
- return false, "Invalid parameters (see /help hasprivs )"
116
+ return false, "Invalid parameters (see /help haspriv )"
117
117
end
118
118
if not core.registered_privileges[param] then
119
119
return false, "Unknown privilege!"
120
120
end
121
121
local privs = core.string_to_privs(param)
122
- local players_with_privs = {}
122
+ local players_with_priv = {}
123
123
for _, player in pairs(core.get_connected_players()) do
124
124
local player_name = player:get_player_name()
125
125
if core.check_player_privs(player_name, privs) then
126
- table.insert(players_with_privs , player_name)
126
+ table.insert(players_with_priv , player_name)
127
127
end
128
128
end
129
- return true, "Players online with the \"" .. param .. "\" priv : " ..
130
- table.concat(players_with_privs , ", ")
129
+ return true, "Players online with the \"" .. param .. "\" privilege : " ..
130
+ table.concat(players_with_priv , ", ")
131
131
end
132
132
})
133
133
0 commit comments