aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-06-16 17:01:21 +0200
committerKahrl <kahrl@gmx.net>2013-06-16 17:01:21 +0200
commitb5918760fb52d7cbaf459012d64251b012923c1e (patch)
tree696eeba33c7e2e7655bf4d74fba67c1d027685b3
parent44053101840594e133886986d28e557bdfb57e8b (diff)
downloadminetest-b5918760fb52d7cbaf459012d64251b012923c1e.tar.gz
minetest-b5918760fb52d7cbaf459012d64251b012923c1e.tar.bz2
minetest-b5918760fb52d7cbaf459012d64251b012923c1e.zip
Tweak IDropAction restriction handling in server.cpp
-rw-r--r--src/server.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 4268bb809..7963aeaae 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2401,6 +2401,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
setInventoryModified(da->from_inv);
+ /*
+ Disable dropping items out of craftpreview
+ */
+ if(da->from_list == "craftpreview")
+ {
+ infostream<<"Ignoring IDropAction from "
+ <<(da->from_inv.dump())<<":"<<da->from_list
+ <<" because src is "<<da->from_list<<std::endl;
+ delete a;
+ return;
+ }
+
// Disallow dropping items if not allowed to interact
if(!checkPriv(player->getName(), "interact"))
{