Skip to content

Commit

Permalink
Tweak IDropAction restriction handling in server.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kahrl committed Jun 16, 2013
1 parent 4405310 commit b591876
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/server.cpp
Expand Up @@ -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"))
{
Expand Down

0 comments on commit b591876

Please sign in to comment.