View/Edit #12:@ren*ame 2rename @copy*! 2copy*! @move*! 2move*!

Switch to edit mode.

Name(s): @ren*ame 2rename @copy*! 2copy*! @move*! 2move*!
1:  "Bounce the @rename, @copy or @move request to the verb specializing in performing that operation on objects, properties, files or verbs."
2:  verb = {"rename", "copy", "move"}[verb[2..4] in {"ren", "cop", "mov"}] + (verb[$] == "!" ? "!" | "")
3:  set_task_perms(player)
4:  if (player != this)
5:    $msg:mtell("huh")
6:  elseif (!iobjstr)
7:    player:tell(verb, " ", dobjstr, " ", prepstr, " what?")
8:  elseif (valid(dobj))
9:    "'@move $foo to here' does not mean '@move #0.foo to here'"
10:   if (valid(iobj) && verb != "rename")
11:     "And '@copy me:bar to $foo' does not mean '@move me:bar to #0.foo' either"
12:     iobjstr = tostr(iobj)
13:   endif
14:   this:("_" + verb + "_obj")(dobj, iobjstr)
15: elseif (spec = $code_utils:parse_fileref(dobjstr))
16:   object = this:my_match_object(spec[1])
17:   if (!$command_utils:object_match_failed(object, spec[1]))
18:     this:("_" + verb + "_file")(object, spec[2], iobjstr)
19:   endif
20: elseif (spec = $code_utils:parse_propref(dobjstr))
21:   object = this:my_match_object(spec[1])
22:   if (!$command_utils:object_match_failed(object, spec[1]))
23:     this:("_" + verb + "_prop")(object, spec[2], iobjstr)
24:   endif
25: elseif (spec = $code_utils:parse_verbref(dobjstr))
26:   object = this:my_match_object(spec[1])
27:   if (!$command_utils:object_match_failed(object, spec[1]))
28:     this:("_" + verb + "_verb")(object, spec[2], iobjstr)
29:   endif
30: else
31:   object = this:my_match_object(dobjstr)
32:   if (!$command_utils:object_match_failed(object, dobjstr))
33:     this:("_" + verb + "_obj")(object, iobjstr)
34:   endif
35: endif
36: "Last modified by MadHatter (#8371) on Fri Aug  9 02:18:18 2002 MDT."

Verb arguments: any at/to any
Verb perms: Readable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

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