Re: Valid_Name bug fix

From: George Greer (greerga@circlemud.org)
Date: 09/06/00


On Sat, 2 Sep 2000, Ben Cartwright wrote:

>  for (dt = descriptor_list; dt; dt = dt->next)
>    if (dt->character && GET_NAME(dt->character) && !str_cmp(GET_NAME(dt->character), newname))
>      if (GET_IDNUM(dt->character) == -1)
>        return (0);

We're trying to prevent duping as well, which was possible previously.
The code handling the login is a PITA to follow to trace any potential
duplication problem.  Most of the trouble resides in loading the character
from disk upon initial name entering instead of later.  I'm not saying it's
necessarily more correct to wait until later since that makes things like
the bad password count and actually getting the password harder.  If you
can prove through the spaghetti that duplication is still impossible with
the above change (keep in mind existing characters load at CON_GET_NAME
with a valid IDNUM), then I'll do it.  Until then, TCP keepalives might
help you a bit, SO_KEEPALIVE with setsockopt().

--
George Greer
greerga@circlemud.org


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT