aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index a8eb68c55..14d8942cb 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2446,7 +2446,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
if(g_settings.getBool("creative_mode") == false)
{
// Skip if inventory has no free space
- if(ilist->getUsedSlots() == ilist->getSize())
+ if(ilist->roomForItem(item) == false)
{
dout_server<<"Player inventory has no free space"<<std::endl;
return;
@@ -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)