@verb #12:"_audit" this none this rxdo #55 @program #12:"_audit" this none this caller == this || raise(E_PERM) set_task_perms(caller_perms()) lines = sizes = {} toasty = 0 nbytes = nobjs = ndisk = 0 folders = {} removeable = {} for y in [1..length(this.audit_folders)] for z in [1..length(this.audit_folders[y][2])] what = this.audit_folders[y][2][z] if (!$recycler:valid(what) || what.owner != this) removeable[1..0] = {{y, z}} endif endfor endfor for y in (removeable) this.audit_folders[y[1]][2] = listdelete(this.audit_folders[y[1]][2], y[2]) endfor for x in (args) if (!$recycler:valid(x)) continue endif folder_idx = -1 if (x.owner == this) for y in [1..length(this.audit_folders)] if (x in this.audit_folders[y][2]) folder_idx = y break endif endfor endif size = `x:object_bytes() ! E_PERM => "UnReadable"' dsize = x:_obj_disk_size() if (`x:_get_subsidised() ! E_PROPNF => 0') dsizestr = "[subsidised]" else dsizestr = dsize || "" endif sizestr = size || "" if (`x:_get_petrified() ! E_PROPNF => 1') expire = "[petrified]" elseif (x:_get_solidified()) expire = "[solidified]" elseif ($object_utils:isa(x, $player)) expire = "" elseif (x:is_expired()) expire = "*EXPIRED*" toasty = toasty + 1 else expire = $string_utils:from_seconds(x.best_before - time()) endif $cmd_utils:suspend_if_needed(0) audit_line = {tostr(x), `this:general_option("antiparanoia") && $cecil_utils:is_malicious(x, "title") ? x.name | x:title() ! ANY => "???"', `$code_utils:classify_object(x) ! ANY => "???"', tostr(sizestr), tostr(dsizestr), expire} if (folder_idx == -1) sizes[1..0] = {size} lines[1..0] = {audit_line} else idx = listiassoc(this.audit_folders[folder_idx][1], folders) if (!idx) folders = {@folders, {this.audit_folders[folder_idx][1], {}}} idx = length(folders) endif folders[idx][2][1..0] = {audit_line} endif if (!(`x:_get_petrified() ! E_PROPNF' || `x:_get_subsidised() ! E_PROPNF')) nobjs = nobjs + 1 nbytes = nbytes + (typeof(size) == $INT ? size | 0) ndisk = ndisk + dsize endif $command_utils:suspend_if_needed() endfor $tcm || (lines = $list_utils:sort(lines, sizes)) lines = {@lines, "-"} lines = {@lines, {"", "Total quota used:", tostr(nobjs), tostr(nbytes), tostr(ndisk), ""}} lines = {@lines, {"", "Free quota:", tostr(dobj:free_objects()), tostr(dobj:free_bytes()), tostr(dobj:free_dbytes()), ""}} for x in (folders) lines = {{"", x[1], "", "", "", ""}, @x[2], "-", @lines} endfor this:tellColumns(3, {20, 10, 15, 20, 20, 20}, {"#", "name", "type", "bytes", "dsize", "good for"}, @lines) if (toasty) this:sub_tell("Total %2 expired objects... %1's coming...", $repo_man, toasty) endif "Last modified by Dax (#789) on Tue May 3 13:51:13 2005 MDT." .