Add name to report messages

This commit is contained in:
rubenwardy 2018-03-30 13:00:26 +01:00
parent 89e831c5c4
commit 5b5d970fe9

View file

@ -71,16 +71,16 @@ minetest.register_chatcommand("report", {
-- Build message for offline listeners
local msg
if #mods == 0 then
msg = "Report: " .. param .. " (no mods online)"
msg = "Report from " ..name .. ": " .. param .. " (no mods online)"
else
msg = "Report: " .. param .. " (mods online: " ..
msg = "Report from " ..name .. ": " .. param .. " (mods online: " ..
table.concat(mods, ", ") .. ")"
end
-- Send to IRC moderators
for _, name in pairs(get_irc_mods()) do
if not minetest.get_player_by_name(name) then
minetest.chat_send_player(name, msg)
for _, toname in pairs(get_irc_mods()) do
if not minetest.get_player_by_name(toname) then
minetest.chat_send_player(toname, msg)
end
end