@verb #17:"@chown" any at/to any rdo #55 @program #17:"@chown" any at/to any "Copied from Generic Teacher (#768):@chown by Juggler (#396) Jan 11 23:06:12 1996" if ($command_utils:player_match_failed(iobj = $string_utils:match_player(iobjstr), iobjstr)) return elseif (!player.wizard && player != iobj && player != iobj.owner) return $msg:mtell("not_own", iobj) elseif (index(dobjstr, ".") && (spec = $code_utils:parse_propref(dobjstr))) if ($command_utils:object_match_failed(object = player:my_match_object(spec[1]), spec[1])) return elseif (!(pi = `property_info(object, prop = spec[2]) ! E_PROPNF')) return player:tell(pi) elseif (!player.wizard && player != pi[1] && player != pi[1].owner) return $msg:mtell("not_own", dobjstr) elseif (index(pi[2], "c")) if (children(object)) if (player.wizard) player:tell("Wizzen-Warning: Chowning a +c property is usually quite useless, and non-wizzen are actually not permitted to do this on an object that has children (such as this one!).") else return player:tell("You cannot chown a +c property on an object with children. It's a useless gesture.") endif else player:tell("Attempt to chown +c property has resulted in the automatic removal of the 'c' permissions bit.") set_property_info(object, prop, {pi[1], strsub(pi[2], "c", "")}) endif endif e = $wiz_utils:set_property_owner(object, prop, iobj) if (e == E_NONE) player:tell("+c property owner changed -- did you really want to do that?") elseif (typeof(e) == $ERR) player:tell(e) else $msg:mtell("chowned", dobjstr, pi[1]:nn(), iobj:nn()) endif elseif (index(dobjstr, ":") && (spec = $code_utils:parse_verbref(dobjstr))) if ($command_utils:object_match_failed(object = player:my_match_object(spec[1]), spec[1])) return elseif (!(vi = `verb_info(object, verb = spec[2]) ! E_VERBNF')) return player:tell(vi) endif oldowner = vi[1] if (!player.wizard && player != oldowner) return $msg:mtell("not_own", dobjstr) endif vi[1] = iobj if (typeof(e = set_verb_info(object, verb, vi)) == $ERR) player:tell(e) else $msg:mtell("chowned", dobjstr, oldowner:nn(), iobj:nn()) endif else if ($command_utils:object_match_failed(object = player:my_match_object(dobjstr), dobjstr)) return endif oldowner = object.owner if (!player.wizard && player != oldowner && player != oldowner.owner) return $msg:mtell("not_own", object) elseif (!player.wizard && (iobj == object || player == object)) player:tell(E_RECMOVE) elseif (!(e = $wiz_utils:set_owner(object, iobj))) player:tell(e) else $msg:mtell("chowned", object:nn(), oldowner:nn(), iobj:nn()) endif endif "Last modified by Dax (#789) on Tue May 3 13:45:56 2005 MDT." .