Uberi/Minetest-WorldEdit — pull request #40 by khonkhortisan (2014-04-22 22:23:59+00:00)
Title: Protection

See README for a description of this change.

This needs lots of testing, so I'm creating an early pull request to attract testers - the more eyes the better!
Because it's an area protection change, the checked regions must be correct to the node with positive and negative axes, positions, and with pos1 and pos2 in inverted corners.
Permission must be correctly chosen from whether it's creative mode, a protection mod is installed, the player has worldedit, area, server, or admin privileges, and whether the land is owned, unowned, owned by someone else, or a combination.
File reads, writes, and world writes and reads must use the correct filename based on the server privilege and have a correct bounding box.
Obviously it shouldn't ever crash.
Someone can probably figure out a way to store the worldedit.privs return value to avoid running it twice.
The actual rules used should also make sense to enough people.

I look forward to the day when I will be able to worldedit on public servers without any special permissions other than area assigned to myself.