Files
assaultcube-/config/scontext.cfg
T
flowtron 7cd5f12854 disable "alias" in map-cfg, script-execution-check removed from compilation
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5707 e016b1c5-ed68-44aa-a2f7-31cac88cffde
2010-10-04 20:38:36 +00:00

23 lines
902 B
INI

// define script security contexts to restrict commands to certain contexts
// do NOT modify
// supported contexts
alias context_core 0 // hardcoded scripts
alias context_cfg 1 // known scripts
alias context_prompt 2 // command prompt
alias context_mapcfg 3 // map configs, we don't trust them
// set allowed commands for the map config context
alias mapcfgidents [ loadnotexture loadsky mapmodelreset mapmodel texturereset texture fog fogcolour mapsoundreset mapsound watercolour shadowyaw ]
loop i (listlen $mapcfgidents) [
scriptcontext $context_mapcfg (at $mapcfgidents $i)
]
// isolate the map config context
// this disables access from this context to identifiers located in other contexts
// also it removes all aliases created in this context once the running context changes
isolatecontext $context_mapcfg
// secure this configuration for the rest of the game
sealcontexts