Add some better logging for these infrequent events.

This commit is contained in:
Auke Kok 2019-08-21 22:50:50 -07:00
parent 7a69c6c733
commit f274254b34
2 changed files with 5 additions and 0 deletions

View File

@ -189,6 +189,7 @@ function boxes.player_success(player)
if sid == conf.tutorial.series then if sid == conf.tutorial.series then
player:set_attribute("tutorial_completed", 1) player:set_attribute("tutorial_completed", 1)
announce.all(name .. " completed the tutorial!") announce.all(name .. " completed the tutorial!")
announce.admins(name .. " completed the tutorial!")
-- reward: create priv -- reward: create priv
local privs = minetest.get_player_privs(name) local privs = minetest.get_player_privs(name)
privs.create = true privs.create = true

View File

@ -764,6 +764,7 @@ function callback.boxes_create(player, fields, context)
if is_admin or (box_get_status(id) == db.STATUS_EDITING and is_builder(id)) then if is_admin or (box_get_status(id) == db.STATUS_EDITING and is_builder(id)) then
minetest.chat_send_player(name, "Submitting box " .. tostring(id)) minetest.chat_send_player(name, "Submitting box " .. tostring(id))
announce.all(name .. " submits box " .. tostring(id)) announce.all(name .. " submits box " .. tostring(id))
announce.admins(name .. " submits box " .. tostring(id))
box_set_status(id, db.STATUS_SUBMITTED) box_set_status(id, db.STATUS_SUBMITTED)
end end
return true return true
@ -772,6 +773,7 @@ function callback.boxes_create(player, fields, context)
if is_admin and box_get_status(id) == db.STATUS_SUBMITTED then if is_admin and box_get_status(id) == db.STATUS_SUBMITTED then
minetest.chat_send_player(name, "Accepting box " .. tostring(id)) minetest.chat_send_player(name, "Accepting box " .. tostring(id))
announce.all(name .. " accepts box " .. tostring(id) .. "!") announce.all(name .. " accepts box " .. tostring(id) .. "!")
announce.admins(name .. " accepts box " .. tostring(id) .. "!")
box_set_status(id, db.STATUS_ACCEPTED) box_set_status(id, db.STATUS_ACCEPTED)
end end
return true return true
@ -780,6 +782,7 @@ function callback.boxes_create(player, fields, context)
if is_builder(id) and box_get_status(id) == db.STATUS_SUBMITTED then if is_builder(id) and box_get_status(id) == db.STATUS_SUBMITTED then
minetest.chat_send_player(name, "Retracted box " .. tostring(id)) minetest.chat_send_player(name, "Retracted box " .. tostring(id))
announce.all(name .. " retracts box " .. tostring(id)) announce.all(name .. " retracts box " .. tostring(id))
announce.admins(name .. " retracts box " .. tostring(id))
box_set_status(id, db.STATUS_EDITING) box_set_status(id, db.STATUS_EDITING)
end end
return true return true
@ -788,6 +791,7 @@ function callback.boxes_create(player, fields, context)
if is_admin and box_get_status(id) == db.STATUS_SUBMITTED then if is_admin and box_get_status(id) == db.STATUS_SUBMITTED then
minetest.chat_send_player(name, "Rejecting box " .. tostring(id)) minetest.chat_send_player(name, "Rejecting box " .. tostring(id))
announce.all(name .. " rejects box " .. tostring(id)) announce.all(name .. " rejects box " .. tostring(id))
announce.admins(name .. " rejects box " .. tostring(id))
box_set_status(id, db.STATUS_EDITING) box_set_status(id, db.STATUS_EDITING)
end end
return true return true