On Wed, 14 Jan 1998 09:43:36 -0700 John Evans <evansj@HI-LINE.NET> wrote: > On Wed, 14 Jan 1998, Christoffer Lundberg wrote: > > > I'm planning on adding an 'introduce' and 'appearance' based > > system on my MUD. The 'appearance' system is easy to add, but > > the 'introduce' part is harder. It will involve something of > > a list or some sort, of which people that have introduced > > themselves to you. How can I do this? Any ideas? > > This has been talked about before, and the concensus was a linked list of > id nums. That allows for dynamic expansion of the list to add in new > introductions. > > The only problem that I see with this, is that after a character has been > deleted and a purge has been run on all the deleted characters, their id > nums will then be available for new characters. I can better illustrate > the problem than describe it. > > Bob introduces himself to you. (idnum = 5) > Bob deletes. > Immort kills the mud, runs the purge to free up spaces, and restarts mud. > Joe makes new character and gets idnum 5 because it's now free. > You now know Joe automatically because his idnum is stored in your list > of known characters. > > There needs to be some method of removing someone's idnum from all > characters list of known characters when they delete. > That's easy. Never reuse player idnums. I suspect it'll be difficult to login two billion people in your mud's lifetime. In addition, when a player logs in, do a get_name_by_id for all the people on the introduction list, then don't add those that return NULL to the list as you are building it during login. --Mallory +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST