Fix bug in Report

This commit is contained in:
rubenwardy 2015-12-30 13:43:09 +00:00
parent 8fdefa5e93
commit dd3d47567e

View file

@ -19,10 +19,10 @@ minetest.register_chatcommand("report", {
-- Get comma separated list of online moderators and admins
local mods = {}
for _, player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
if minetest.check_player_privs(name, {kick = true, ban = true}) then
table.insert(mods, name)
minetest.chat_send_player(name, "-!- " .. name .. " reported: " .. param)
local pname = player:get_player_name()
if minetest.check_player_privs(pname, {kick = true, ban = true}) then
table.insert(mods, pname)
minetest.chat_send_player(pname, "-!- " .. name .. " reported: " .. param)
end
end