From 5b5d970fe9ec508b99be325b440e4d315e8eb4de Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 30 Mar 2018 13:00:26 +0100 Subject: [PATCH] Add name to report messages --- mods/report/init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/report/init.lua b/mods/report/init.lua index 43afaca..9e1e794 100644 --- a/mods/report/init.lua +++ b/mods/report/init.lua @@ -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