Re: do_set check

From: Daniel A. Koepke (dkoepke@circlemud.org)
Date: 07/11/01


On Thu, 12 Jul 2001, Kras Kresh wrote:

> Shouldn't do_set check is_file and get_player_vis(ch, vict, NULL,
> FIND_CHAR_WORLD) and then pass it to perform_set?

It took me a while to understand what you were saying, which wasn't a good
deal of fun.  But, after looking at the code and reading your message a
few times, I think I'm finally on to it.

What you're asking is if do_set() should do something about 'set file' on
a player that is already online.  You were suggesting the code be ammended
to do something about it.  I don't know what you're wanting passed to
perform_set(), but from what I gathered, the issue can be addressed
with something along these lines in do_set():

  -   } else if (is_file) {
  +   } else if ((vict = get_player_vis(ch, name, FIND_CHAR_WORLD))) {
  +     /* 'set file' on an online player works like 'set player' */
  +     is_file = 0;
  +   } else {

That is, if we have 'set file' and the player is online and visible, then
ignore the is_file flag (turn it off).

Anyone see any problems with this change?  Can anyone think of a reason to
leave it as is?  (The reason to change it, I guess, is that 'set file' on
an online player will have no real result, except a disk read and disk
write, but the committed changes will be overwritten and the online player
won't reflect the changes.  Thus, 'set file' on an online player is an
effective non-op.)


-dak

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST