@verb #53:"www_recreate" this none this rxdo #55 @program #53:"www_recreate" this none this "Recreates an object based on iobj (the 'post' CGI)." "Called by $recycler:tell_www_body" caller == this || raise(E_PERM) player:isa($webber) || raise(E_PERM) set_task_perms(player.user) if (player.referer && $www:previous_object() != this) "We have an unknown form refering a recreate to us..." $msg:mtell("www_error", "Warning! Previous page doesn't appear to be this one!") player:tell("For security reasons the object will not be created. Refering page: [", player.referer, "]") dobj = {} elseif (player.user == $no_one || !player.user:isa($builder)) $msg:mtell("www_error", "Permission denied! You aren't logged in as a builder.") dobj = {} elseif ((child = $su:trim($www:parse_POST("child"))) && (parent = $su:trim($www:parse_POST("parent")))) "Match the objects." childobj = $code_utils:toobj(child) if (childobj == E_TYPE) childobj = $su:literal_object("#" + child) endif parentobj = $su:literal_object(parent) if (parentobj == #-3) parentobj = $su:literal_object("#" + parent) endif if (child == E_TYPE || childobj < #0 || childobj > max_object()) $msg:mtell("www_error", tostr("Invalid child object! '", child, "' is not an object number between #0 and ", max_object(), ".")) elseif (parentobj < #0 || parentobj > max_object()) $msg:mtell("www_error", tostr("Invalid parent object! '", parent, "' is not a '$' core name or an object number between #0 and ", max_object(), ".")) elseif (this:valid(childobj)) $msg:mtell("www_error", tostr("Invalid child object! '", $su:nn(childobj), "' isn't a garbage object in the recycler. It is already in use.")) elseif (!this:valid(parentobj)) $msg:mtell("www_error", tostr("Invalid parent object! '", parentobj, "' is a garbage object in the recycler.")) elseif (childobj.recycled_time >= $recycler.last_complete_refkill_sweep) $msg:mtell("www_error", "Sorry, the DB has not been swept clean of old object #s since this object was reycled.") player:tell("Either choose a different object from the recycler, or kick the $recycler and try again in about 10 minutes.") elseif (!(e = `$building_utils:recreate(childobj, parentobj) ! ANY')) $msg:mtell("www_error", tostr("Error! ", e)) else suspend(5) if (childobj:isa($physical)) childobj:moveto(player.user) endif player:tell("Success! You now own ", childobj, " and it is now a child of ", $su:nn(parentobj), ". Use ", childobj, "'s setup page to configure it.
") endif endif "Last modified by Dax (#789) on Tue May 3 14:09:30 2005 MDT." .