mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-23 08:08:47 -05:00
Tweak IDropAction restriction handling in server.cpp
This commit is contained in:
parent
4405310184
commit
b5918760fb
@ -2401,6 +2401,18 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
|
|
||||||
setInventoryModified(da->from_inv);
|
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
|
// Disallow dropping items if not allowed to interact
|
||||||
if(!checkPriv(player->getName(), "interact"))
|
if(!checkPriv(player->getName(), "interact"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user