Re: [Serious Loophole]

From: d. hall (dhall@APK.NET)
Date: 01/15/98


// thus on Thu, 15 Jan 1998 17:28:08 -0500, Angus virtually wrote:

>      DAMN!!! he is right!  just have a couple of players log in at the same
>      time doing each step at the same time.... amazing
>      --Angus

One possible solution is to place a check in the main game loop, and cross
reference all names.  I just went and downloaded 3.0.12 (again)

Maybe in function nanny, search for "case CON_GET_NAME:" in interpreter.c,
do a search through the descriptor_list and strcmp against the currently
active descriptors, you figure even if they're at exactly the same time,
they still need to be processed sequentially.

This is UNTESTED, and should be cleaned up

        /* player unknown -- make new character */

        if (!Valid_Name(tmp_name)) {
          SEND_TO_Q("Invalid name, please try another.\r\n", d);
          SEND_TO_Q("Name: ", d);
          return;
        }
        for (fd = descriptor_list; *fd; fd = fd->next)
           if (!strcasecmp (tmp_name, fd->character->player->name)) {
              SEND_TO_Q("Invalid name, please try another.\r\n", fd);
              SEND_TO_Q("Name: ", d);
              return;
            }

        CREATE(d->character->player.name, char, strlen(tmp_name) + 1);
        strcpy(d->character->player.name, CAP(tmp_name));

        sprintf(buf, "Did I get that right, %s (Y/N)? ", tmp_name);
        SEND_TO_Q(buf, d);
        STATE(d) = CON_NAME_CNFRM;

d.


     +------------------------------------------------------------+
     | 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