MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Please answer the News question



>>        @addnews (anything) to $news
>>
>>where anything is really # of message on *news. Nevertheless on my meeting
>>moo I have to issue the command as:
>>
>>        @addnews [# of message] to #61

> Yes, you have to use the object number here.  Something about the examine
> verbs on $news must be returning it's name as "$news".

Well, you only have to use the object number because the server doesn't match
references which spring off of #0 properties (like "$news").  This problem is
easily resolvable in two steps.

 - Add a :last_huh to $player which looks something like this:

| ":last_huh(verb,args)  final attempt to parse a command...";
| set_task_perms(caller_perms());
| verb = args[1];
| args = args[2];
| if (verb[1] == "@" && prepstr == "is")
|   "... set or show _msg property ...";
|   set_task_perms(player);
|   $last_huh:(verb)(@args);
| elseif (verb in {"give", "hand", "get", "take", "drop", "throw"})
|   $last_huh:(verb)(@args);
| elseif (valid(dobj = $string_utils:literal_object(dobjstr)) && (r =
|     $match_utils:match_verb(verb, dobj, args)))
|   return r;
| elseif (valid(iobj = $string_utils:literal_object(iobjstr)) && (r =
|     $match_utils:match_verb(verb, iobj, args)))
|   return r;
| else
|   return 0;
| endif
| return 1;

   This will match verbs on Core objects (if $string_utils:literal_object
   resolves them properly) and execute them if +x.

 - Make the bothersome verbs on $news (or any Core object, really) +x
   after reviewing all security issues.  (Remember, when making these
   changes, that these commands may be called via :huh parsing or via
   regular server parsing!)

This is actually a good way to deal with the problem.  Object numbers are
not intuitive.

Seth / Blackbriar
----------------------------------------------------------------------
Seth I. Rich
Woo, woo!  OpalMOO's back!       There is nothing more precious than
Rabbits on walls, no problem.    a tear of true repentance.




Home | Subject Index | Thread Index