Skip to content

Commit

Permalink
check claims on autosave toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Feb 23, 2024
1 parent 56325ea commit e72fe5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands/autosave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ minetest.register_chatcommand("bx_autosave", {
return true, err_msg
end

local claims = blockexchange.get_claims(name)
if area.username ~= claims.username then
return true, "You are not authorized to edit that area"
end

local msg = "Autosave for area: " .. area.id .. ": "
if area.autosave then
area.autosave = false
Expand Down

0 comments on commit e72fe5b

Please sign in to comment.