Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Tweak IDropAction restriction handling in server.cpp
- Loading branch information
Showing
with
12 additions
and
0 deletions.
-
+12
−0
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")) |
|
|
{ |
|
|