@verb #1:"_kick" this none this rxdo #789 @program #1:"_kick" this none this "Begin generic security check (_kick)" if (verb == "_kick" && !args[1]:isa(this)) raise(E_INVARG, "Illegal object", args[1]) return E_INVARG endif "End generic security check (_kick)" "This verb is executed roughly once a week on every object. Does basic cleaning." {object} = args "Reevaluate the disk size." suspend(0) q = 0 for x in (object:filelist()) q = q + `object:filesize(x) ! E_INVARG => 0' $command_utils:suspend_if_needed() endfor object.obj_disk_size = q "Make sure your owner knows s/he owns you." if (valid(object.owner)) `object.owner.owned_objects = setadd(object.owner.owned_objects, object) ! E_PROPNF' endif if (valid(parent(object)) && parent(object) != $garbage) "Run through all properties, find inherited +c ones, and make sure the prop is owned by the object's owner." for x in ($set_utils:difference_suspended(object:all_properties_suspended(), $code_utils.builtin_props)) try i = property_info(object, x) except e (ANY) "This seems to happen on $database objects, since when they are kicked, they delete all their properties and regenerate" "all while this verb is running. No simple fix, but it's not like databases care much about +c props anyway." endtry $command_utils:suspend_if_needed() if (!(x in properties(object))) if (index(i[2], "c") && i[1] != object.owner) set_property_info(object, x, {object.owner, i[2]}) endif $command_utils:suspend_if_needed() else "We want to be able to have properties on objects owned by other people if +-c doesn't matter." endif endfor endif "Non-physical non-garbage objects belong nowhere." if (object.location != $nothing && !object:isa($garbage) && !object:isa($physical)) move(object, $nothing) endif "Scan all verbs for invalid $references and mail owner if any are found." verbnames = verbs(object) for x in [1..length(verbnames)] owner = verb_info(object, x)[1] if ($recycler:valid(owner)) bad = $code_utils:bad_ref(object, x) if (bad) msg = {tostr("During an automated sweep of the Moo's verbs, I discovered a bug in one of yours. ", object:nn(), ":\"", verbnames[x], "\" contains the following invalid reference(s):"), "--> " + $su:english_list(bad), "", "You may wish to fix this bug.", "Your faithful servant, The Housekeeper."} $mail_agent:send_message($housekeeper, {owner}, "Invalid $reference", msg) endif bad = $code_utils:bad_obj(object, x) if (bad) msg = {tostr("During an automated sweep of the Moo's verbs, I discovered a bug in one of yours. ", object:nn(), ":\"", verbnames[x], "\" contains the following invalid object number(s):"), "--> " + $su:english_list(bad), "", "You may wish to fix this bug.", "Your faithful servant, The Housekeeper."} $mail_agent:send_message($housekeeper, {owner}, "Invalid object number", msg) endif else "Got something more useful than wiz-alert? Feel free to add it. -- Dax." $wiz_utils:wiz_alert(object:nn(), " has a verb owned by an invalid object.") endif endfor "Last modified by Cecil (#7407) on Thu Jan 9 11:19:57 2003 MST." .