@verb #310:"tell_quota" this none this rxdo #789 @program #310:"tell_quota" this none this player:isa($webber) || raise(E_PERM) {who} = args if (player.user:isa($guardian) && caller == this) "Allow for quota hacking." guard = 1 if ((qobj = $www:parse_POST("qobj")) && (qvm = $www:parse_POST("qvm")) && (qfs = $www:parse_POST("qfs"))) "Let's fiddle with someone's quota." if (player.referer && $www:previous_object() != this) "We have an unknown form refering a quota change to us..." $msg:mtell("www_error", "Warning! Previous page doesn't appear to be this one!") player:tell("For security reasons the quota change will not be executed. Refering page: [", player.referer, "]") else who.max_obj = toint(qobj) who.max_vm = toint(qvm) * $kb who.max_fs = toint(qfs) * $kb player:tell("Quota change successful.
") endif endif else guard = 0 endif set_task_perms($no_one) type = {"", "Object:
(objects)", "Byte:
(kilobytes)", "Disk:
(kilobytes)"} total = {"Total:", who:_get_max_obj(), who:_get_max_vm() / $kb, who:_get_max_fs() / $kb} free = {"Free:", who:free_objects(), who:free_bytes() / $kb, who:free_dbytes() / $kb} used = {"Used:", total[2] - free[2], total[3] - free[3], total[4] - free[4]} if (guard) total = {total[1], tostr(""), tostr(""), tostr("")} endif guard && player:tell("
") player:TellColumns(3, {1, 1, 1, 1}, type, used, free, total) guard && player:tell("
") "Last modified by Dax (#789) on Tue May 3 14:09:31 2005 MDT." .