@verb #8438:"@quota" any none none rxo #8438 @program #8438:"@quota" any none none "Written by Daryl (#3887) Jun 26 00:17:47 1998" "Hacked by Jay (#8438) to return the old quota style, with the new accurate information." if (caller != this) return $msg:mtell("huh") elseif (dobjstr == "") dobj = this elseif ($command_utils:player_match_failed(dobj = this:match_entity(dobjstr), dobjstr)) return endif "Initializes a few necessary variables." total = {dobj:_get_max_obj(), dobj:_get_max_vm() / $kb, dobj:_get_max_fs() / $kb} free = {dobj:free_objects(), dobj:free_bytes() / $kb, dobj:free_dbytes() / $kb} units = {"objects", "kb", "kb"} type = {"object", "byte", "file"} "Prints the formated quota statistics" for i in [1..length(total)] player:tell(dobj.name, " has a ", type[i], " quota of ", tostr(total[i]), " ", units[i], ", of which ", tostr(free[i]), " ", units[i], " are free.") endfor "Displays the contributions." for x in (dobj.quota_contribs) parts = {} if (x[2..4] == {0, 0, 0}) else if (x[2]) parts = {@parts, $msg:substitute(this, "%1 %2 of byte quota", x[2] > 0 ? "contributed" | "received", $quota:kb_string((x[2] < 0 ? -1 | 1) * x[2]))} endif if (x[3]) parts = {@parts, $msg:substitute(this, "%1 %2 objects", x[3] > 0 ? "contributed" | "received", (x[3] < 0 ? -1 | 1) * x[3])} endif if (x[4]) parts = {@parts, $msg:substitute(this, "%1 %2 of disk quota", x[4] > 0 ? "contributed" | "received", $quota:kb_string((x[4] < 0 ? -1 | 1) * x[4]))} endif this:sub_tell("%d has %1 %2 %3.", parts, index(parts[$], "contrib") ? "to" | "from", x[1]) endif endfor .