mirror of
https://github.com/rubenwardy/report.git
synced 2025-01-08 17:00:28 +01:00
Update to support email
This commit is contained in:
parent
03441a5fee
commit
49c880c2f6
@ -1 +1 @@
|
|||||||
chatplus
|
email
|
||||||
|
8
init.lua
8
init.lua
@ -1,7 +1,3 @@
|
|||||||
if not chatplus.send_mail then
|
|
||||||
error("You need to update chatplus!")
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_chatcommand("report", {
|
minetest.register_chatcommand("report", {
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
param = param:trim()
|
param = param:trim()
|
||||||
@ -28,11 +24,11 @@ minetest.register_chatcommand("report", {
|
|||||||
|
|
||||||
if #mods > 0 then
|
if #mods > 0 then
|
||||||
mod_list = table.concat(mods, ", ")
|
mod_list = table.concat(mods, ", ")
|
||||||
chatplus.send_mail(name, minetest.setting_get("name"),
|
email.send_mail(name, minetest.setting_get("name"),
|
||||||
"Report: " .. param .. " (mods online: " .. mod_list .. ")")
|
"Report: " .. param .. " (mods online: " .. mod_list .. ")")
|
||||||
return true, "Reported. Moderators currently online: " .. mod_list
|
return true, "Reported. Moderators currently online: " .. mod_list
|
||||||
else
|
else
|
||||||
chatplus.send_mail(name, minetest.setting_get("name"),
|
email.send_mail(name, minetest.setting_get("name"),
|
||||||
"Report: " .. param .. " (no mods online)")
|
"Report: " .. param .. " (no mods online)")
|
||||||
return true, "Reported. We'll get back to you."
|
return true, "Reported. We'll get back to you."
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user