[Turn off line numbering]1: var obj, p, c, cmd; 2: 3: // cleanup some of $root's messiness 4: for obj in ($root.descendants()) { 5: (| obj.clean_root() |); 6: refresh(); 7: } 8: 9: // purge all command caches 10: for obj in ($command_cache.descendants()) { 11: (| obj.purge_cache() |); 12: refresh(); 13: } 14: 15: // check user info (move'em home etc) 16: for obj in ($user.descendants()) { 17: if ((| obj.home() != obj.location() |)) 18: (| obj.move_to(obj.home()) |); 19: refresh(); 20: } 21: 22: // validate all locations and location content's 23: for obj in ($physical.descendants()) { 24: (| obj.validate_contents() |); 25: if (obj.has_ancestor($located)) { 26: if (!valid(obj.location()) || !(obj in obj.location().contents())) 27: (| obj.move_to((| obj.home() |) || $lost_and_found) |); 28: } 29: refresh(); 30: }
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit