Subject: Re: getting players from the recycler

From: Lynx <[email-masked]>
Date: Sat, 24 Jul 1993 10:43:56 -0700

I just had a thought about this.  The player DB may already do this, (I don't
think so, but I havn't reached it yet).  Anyhow, what I was thinking of was to
have the playerDB save all players and their names, indexed with their object
number.  Now, the way this will come into use is when people can use that
indexing (or whatever) to refer to the player, rather than their object number. 
Then, when they are recycled and the verb/whatever calls up the pdb, the pdb
returns that that player no longer exists, rather than having it return a
chair, or somthing else like that...

	-Brandon (Lynx/Shade Pendragon --DarkurtheMOO)

---

From: [email-masked]
Date: Sat, 24 Jul 1993 12:31:44 -0700

Brandon writes about how to deal with accessing recycled player #s...

There already is the player_db, which gives the player number from the
name, and is_player() returns whether the given object is a player.
I'd imagine a lot of stuff in the core (but maybe not minimal.db)
would break if you didn't do a real careful job with implementing the
idea - take the :tell verb for example.  When you do a room announce
you don't care if the various objects in the room contents are players
that you call tell on.  My guess is the best thing to do if you want to
guarantee that the object you're dealing with is to use is_player() and
let it go at that - otherwise you're introducing needless complexity.
After all, is_player() is obscenely cheap - 1 tick.

It does bring up an interesting thought though.  Over time the db will
start to have more and more properties that refer to non-existent
players (and objects).  For a moo with a lot of recycled or garbage
objects compared to the number of valid non-garbage objects it could
become a serious issue.  I can seen no way to prune the db of this
cruft except by putting special verbs on each object that will patch
its properties properly.  That would probably be a hard thing for the
random moo programmer to get right.

                                               - [email-masked]