View/Edit #59:reposses

Switch to edit mode.

Name(s): reposses
1:  caller != this && !caller_perms().wizard && raise(E_PERM)
2:  this.last_active = time()
3:  {what, ?stuff = 0} = args
4:  if (stuff)
5:    what.key = 0
6:    what.anchor = #-1
7:    this:tell("Repoing ", what)
8:    move(what, is_player(what) || what:isa($player) ? this.graveyard | this.box)
9:  endif
10: if (is_player(what))
11:   $wiz_utils:unset_player(what, this)
12:   $cemetary:embalm(what)
13: else
14:   if (!what:has_property("__owned_by"))
15:     try
16:       add_property(what, "__owned_by", what.owner, {$slacker, "r"})
17:     except (E_INVARG)
18:       "some descendant has been repossessed.  Doh!"
19:       add_property(what, "__temp_owned_by", what.owner, {$slacker, "r"})
20:       for x in (what:descendants())
21:         x.__temp_owned_by = `x.__owned_by ! E_PROPNF'
22:       endfor
23:       for x in (what:descendants())
24:         `delete_property(x, "__owned_by") ! E_PROPNF => "Oh well."'
25:       endfor
26:       set_property_info(what, "__temp_owned_by", {$slacker, "r", "__owned_by"})
27:     endtry
28:   endif
29:   $wiz_utils:set_owner(what, this, "OK to suspend!")
30:   this.log = {@this.log, {time(), what, callers(1)}}
31: endif
32: "Last modified by Cecil (#7407) on Sun Nov  3 21:53:00 2002 MST."

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

You are not logged in.

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