aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-12-11 17:33:44 +0100
committerGitHub <noreply@github.com>2017-12-11 17:33:44 +0100
commit308bb69eefdfb2ff3b893c124ccf0321d99a1bfd (patch)
tree80fa4808475690f80510dcd6779d671ddbbcbd84 /src/network
parent02cc257fe09ee0a68f3c09e0cbe48cbbda29a71c (diff)
downloadminetest-308bb69eefdfb2ff3b893c124ccf0321d99a1bfd.tar.gz
minetest-308bb69eefdfb2ff3b893c124ccf0321d99a1bfd.tar.bz2
minetest-308bb69eefdfb2ff3b893c124ccf0321d99a1bfd.zip
CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)
* CSM fixes: load mods after flavours & add flavour to block mod loading * Don't permit to load mods twice * Prepare builtin integrity global algorithm * Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour * flag typo fix * Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
Diffstat (limited to 'src/network')
-rw-r--r--src/network/clientpackethandler.cpp4
-rw-r--r--src/network/networkprotocol.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index 5de99418e..0ec46049e 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -1326,6 +1326,10 @@ void Client::handleCommand_SrpBytesSandB(NetworkPacket* pkt)
void Client::handleCommand_CSMFlavourLimits(NetworkPacket *pkt)
{
*pkt >> m_csm_flavour_limits >> m_csm_noderange_limit;
+
+ // Now we have flavours, load mods if it's enabled
+ // Note: this should be moved after mods receptions from server instead
+ loadMods();
}
/*
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h
index fe68f39b2..1f10822e1 100644
--- a/src/network/networkprotocol.h
+++ b/src/network/networkprotocol.h
@@ -921,10 +921,11 @@ enum PlayerListModifer: u8
enum CSMFlavourLimit : u64 {
CSM_FL_NONE = 0x00000000,
- CSM_FL_LOOKUP_NODES = 0x00000001, // Limit node lookups
+ CSM_FL_LOAD_CLIENT_MODS = 0x00000001, // Disable mods provided by clients
CSM_FL_CHAT_MESSAGES = 0x00000002, // Disable chat message sending from CSM
CSM_FL_READ_ITEMDEFS = 0x00000004, // Disable itemdef lookups
CSM_FL_READ_NODEDEFS = 0x00000008, // Disable nodedef lookups
+ CSM_FL_LOOKUP_NODES = 0x00000010, // Limit node lookups
CSM_FL_ALL = 0xFFFFFFFF,
};