--if there's no protection mod, no worldedit means no editing, worldedit means editing anywhere (old behaviour)
--if there's a protection mod, no worldedit means editing only in your area, worldedit means editing in no-man's land too, areas means editing anywhere.
--let the other mod load first
minetest.after(0,function()
--I would use mod.soft_depend from commonlib, but there are multiple mods that could create owned land
--this silly syntax was copied from safe_region, which is actually executed on chatcommand registration, and must return a function instead of the result of a function.
--The innermost anonymous function is declared. Then safe_region executes, adding a function wrapper around that function. Then worldedit.privs gets that as an argument, and adds another wrapper. The doubly-wrapped function is the one registered as a chatcommand.
--If there's no mod, worldedit.privs already required that you have the worldedit privilege,then if you were able to run this command, then you have the worldedit privilege.
--Or, you can set areas, so you are allowed to worldedit them too. The ability to set the whole world as owned by yourself is already potentially destructive, what's more destructive capability?
--[[I need to use a special per-command region (think /stack, or even worse, /move), the same one safe_region uses, but corner points instead of count... instead of a for loop interpolating between pos1 and pos2]]--
Ifitwastreateddifferently(it's not), then single edits would not be able to cross the border between someone else'seditableland,andno-man's land, to prevent accidental writes. It may cross the border between multiple people'seditableland(orshouldit?),suchastocreateabridgebetweentwoskyscrapersthatwerepreviouslybuiltseparately.