// define script security contexts to restrict commands to certain contexts // do NOT modify // supported contexts context_core = 0 // hardcoded scripts context_cfg = 1 // known scripts context_prompt = 2 // command prompt context_mapcfg = 3 // map configs, we don't trust them // set allowed commands for the map config context 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