Switch to edit mode.
Name(s): @disk-desc*ription1: "@disk-description <object> is <file ref>"
2: "See ?@disk-desc"
3: what = player:my_match_object(dobjstr)
4: fileref = $code_utils:parse_fileref(iobjstr)
5: fileobj = player:my_match_object(fileref[1])
6: if (player != this)
7: return $msg:mtell("huh")
8: elseif (!player:controls(what))
9: return player:tell("You don't have control over ", what:title(), " (", what, ").")
10: elseif (!player:controls(fileobj))
11: return player:tell("You don't have control over ", fileobj:title(), " (", fileobj, ").")
12: elseif (player:free_dbytes() < value_bytes(what.description))
13: return player:Tell("I'm afraid you don't have the disk quota needed for that.")
14: endif
15: x = what.description
16: if (!fileobj:fileexists(fileref[2]) || $cmd_utils:yes_or_no(tostr("The file ", fileobj, "!", $file_utils:trans_to(fileref[2]), " already exists. Overwrite by copying the current room description?")))
17: x = typeof(x) == $STR ? {x} | x
18: fileobj:filewrite(fileref[2], x)
19: endif
20: what.description = {"*file*", fileobj, $file_utils:trans_to(fileref[2])}
21: if (what:has_verb("Description") != {#1})
22: player:tell("* Warning *. ", what:title(), " (", what, ") has a description verb defined on it that is not on #1. Therfore, the disk based description may not be accessed. If it isn't, talk to ", what:has_verb("description")[1].owner:title(), " (", what:has_verb("description")[1].owner, ") and ask them to read ?@disk-description and update their verb accordingly.")
23: endif
24: player:Tell("Description now references file ", fileobj, "!", $file_utils:trans_to(fileref[2]), ".")
25: "Last modified by Dax (#789) on Tue May 3 14:03:25 2005 MDT."