@verb #17:"@grant @grants* @transfer" any at/to any rdo #55 @program #17:"@grant @grants* @transfer" any at/to any "@grant to " "@grants to --- same as @grant but may suspend." "@transfer to -- like 'grant', but evalutes a possible list of objects to transfer, and modifies quota." "Ownership of the object changes as in @chown and :set_owner (i.e., .owner and all c properties change). In addition all verbs and !c properties owned by the original owner change ownership as well. Finally, for !c properties, instances on descendant objects change ownership (as in :set_property_owner)." if (!player.wizard || player != this) player:notify("Sorry.") return endif set_task_perms(player) if (!iobjstr || !dobjstr) return player:notify(tostr("Usage: ", verb, " <object> to <player>")) endif if ($command_utils:player_match_failed(newowner = $string_utils:match_player(iobjstr), iobjstr)) "...newowner is bogus..." return endif if (verb == "@transfer") objlist = player:eval_cmd_string(dobjstr, 0) if (!objlist[1]) player:notify(tostr("Had trouble reading `", dobjstr, "': ")) player:notify(@objlist[2]) return elseif (typeof(objlist[2]) == $OBJ) objlist = objlist[2..2] elseif (typeof(objlist[2]) != $LIST) player:notify(tostr("Value of `", dobjstr, "' is not an object or list: ", toliteral(objlist[2]))) return else objlist = objlist[2] endif elseif ($command_utils:object_match_failed(object = this:my_match_object(dobjstr), dobjstr)) "...object is bogus..." return else objlist = {object} endif if (verb == "@transfer" && newowner:free_objects() < length(objlist)) player:tell("Sorry, ", $string_utils:nn(newowner), " doesn't have enough quota.") return endif suspendok = verb != "@grant" player:tell("Transfering ", toliteral(objlist), " to ", $string_utils:nn(newowner)) for object in (objlist) $command_utils:suspend_if_needed() " if (!`object.best_before ! E_PROPNF => 0')" " $building_utils:set_best_before(object, time() + $quota:ttl());" " player:tell(\"Note: \", object.name, \" (\", object, \") thawed!\");" " endif" same = object.owner == newowner for vnum in [1..length(verbs(object))] info = verb_info(object, vnum) same = same && info[1] == newowner info[1] = newowner try set_verb_info(object, vnum, info) except e (E_PERM) player:tell("Had trouble changing the owner of verb \"", info[3], "\": It could be non-overridable or not have its \"d\" permission set.") endtry endfor for prop in ($set_utils:difference(object:all_properties(), $code_utils.builtin_props)) if (suspendok && (ticks_left() < 10000 || seconds_left() < 2)) suspend(0) endif info = property_info(object, prop) if (index(info[2], "c") || (info[1] == object.owner && valid(info[1]) && is_player(info[1]))) same = same && info[1] == newowner $wiz_utils:set_property_owner(object, prop, newowner, suspendok) endif endfor if (suspendok) suspend(0) endif $wiz_utils:set_owner(object, newowner, suspendok) if (same) player:notify(tostr(newowner.name, " already owns everything ", newowner.name, " is entitled to on ", object.name, ".")) else player:notify(tostr("Ownership changed on ", $string_utils:nn(object), ", verb, properties and descendants' properties.")) endif endfor "Last modified by Dax (#789) on Tue May 17 14:13:30 2005 MDT." .