1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

CSM restrictions: Make 'LOAD_CLIENT_MODS' disable loading of 'builtin' (#8000)

Previously, when the CSM restriction 'LOAD_CLIENT_MODS' was used a
client was still able to add CSM code to 'builtin' to bypass that
restriction, because 'builtin' is not yet verified.

Until server-sent CSM and verifying of 'builtin' are complete, make
'LOAD_CLIENT_MODS' disable the loading of builtin.

Clarify code comments and messages to distinguish between client-side
modding and client-side scripting. 'Scripting' includes 'builtin',
'modding' does not.
This commit is contained in:
Paramat 2019-01-03 11:10:07 +00:00 committed by Loïc Blot
parent c26eab6319
commit ceacff13a6
4 changed files with 38 additions and 16 deletions

View file

@ -947,7 +947,11 @@ enum PlayerListModifer: u8
enum CSMRestrictionFlags : u64 {
CSM_RF_NONE = 0x00000000,
CSM_RF_LOAD_CLIENT_MODS = 0x00000001, // Disable mods provided by clients
// Until server-sent CSM and verifying of builtin are complete,
// 'CSM_RF_LOAD_CLIENT_MODS' also disables loading 'builtin'.
// When those are complete, this should return to only being a restriction on the
// loading of client mods.
CSM_RF_LOAD_CLIENT_MODS = 0x00000001, // Don't load client-provided mods or 'builtin'
CSM_RF_CHAT_MESSAGES = 0x00000002, // Disable chat message sending from CSM
CSM_RF_READ_ITEMDEFS = 0x00000004, // Disable itemdef lookups
CSM_RF_READ_NODEDEFS = 0x00000008, // Disable nodedef lookups