Add support for the email mod
This commit is contained in:
parent
a240c39a64
commit
9422add415
@ -11,5 +11,6 @@ read_globals = {
|
||||
"intllib",
|
||||
"default",
|
||||
"rules",
|
||||
"email",
|
||||
table = { fields = { "copy", "getn" } }
|
||||
}
|
||||
|
@ -1 +1,2 @@
|
||||
rules?
|
||||
email?
|
||||
|
8
init.lua
8
init.lua
@ -135,7 +135,13 @@ function filter.on_violation(name, message)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.log("action", "VIOLATION (" .. resolution .. "): <" .. name .. "> ".. message)
|
||||
local logmsg = "VIOLATION (" .. resolution .. "): <" .. name .. "> ".. message
|
||||
minetest.log("action", logmsg)
|
||||
|
||||
local email_to = minetest.settings:get("filter.email_to")
|
||||
if email_to and minetest.global_exists("email") then
|
||||
email.send_mail(name, email_to, logmsg)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(minetest.registered_on_chat_messages, 1, function(name, message)
|
||||
|
Loading…
Reference in New Issue
Block a user