Support for protection mods has recently been added to the Minetest API.
You can see an example of how protection mods should use this here.
Any mods that want to check if a position is protected should use minetest.is_protected(pos, playername). This is an improvement over having to use hacks like this.
This also allows you to do special things on protection violations, for example damaging or banning the player.
Protection mods that do not update will still work, mostly. Any mod that checks protection at a position will believe that the position is unprotected, whether or not it is.
You can get more details in lua_api.txt.