View/Edit #85:del_ref

Switch to edit mode.

Name(s): del_ref
1:  "Deletes a $reference."
2:  caller == this || raise(E_PERM)
3:  player:isa($webber) || raise(E_PERM)
4:  if (player.referer && $www:previous_object() != this)
5:    "We have an unknown form refering an reference delete to us..."
6:    $msg:mtell("www_error", "Warning!  Previous page doesn't appear to be this one!")
7:    player:tell("For security reasons the reference delete will not be executed.  Refering page: [", player.referer, "]")
8:    return
9:  endif
10: {prop} = args
11: victim = $has_property(prop)
12: if (victim)
13:   victim = victim[1]
14: else
15:   return "Quietly, no error."
16: endif
17: value = #0.(prop)
18: if (typeof(value) != $OBJ)
19:   $msg:mtell("www_error", "$" + prop + " isn't an object reference!")
20: elseif (player.user:controls(#0.(prop)))
21:   delete_property(victim, prop)
22:   player:tell("<B>Deleted $", prop, " (", value, ") from ", $find_ref(victim) || victim, ".</B><BR>")
23:   player:tell("You may wish to <A HREF=\"/grep?text=%24", prop, "&all_matches=on&objects=&verbs=on\">grep for old instances of $", prop, "</A> which will now be broken.<BR>")
24: else
25:   $msg:mtell("www_error", "Permission denied")
26: endif
27: "Last modified by Dax (#789) on Wed May  4 06:44:31 2005 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

[home | help | who | search | setup | code]