aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacobF <queatz@gmail.com>2011-08-23 22:08:09 -0400
committerJacobF <queatz@gmail.com>2011-08-23 22:08:09 -0400
commit2e82268a6789d225c191a7c6bf8bc6a5ea6181a1 (patch)
tree60f6abf20902c429959223d046ab21b388dfdd3d /src
parentefd8dabd913b2d1a0564378c30ae86c7a5081f06 (diff)
downloadminetest-2e82268a6789d225c191a7c6bf8bc6a5ea6181a1.tar.gz
minetest-2e82268a6789d225c191a7c6bf8bc6a5ea6181a1.tar.bz2
minetest-2e82268a6789d225c191a7c6bf8bc6a5ea6181a1.zip
If a user doesn't have build rights, don't allow them to move items to and from their inventory
Diffstat (limited to 'src')
-rw-r--r--src/server.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index a8eb68c55..88cd7f342 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -3198,6 +3198,9 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
mlist->addItem(item1);
}
}
+ // Disallow moving items if not allowed to build
+ else if((getPlayerPrivs(player) & PRIV_BUILD) == 0)
+ return;
}
if(disable_action == false)