Re: saving ip addresses

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


On Thu, 7 Jun 2001, Kras Kresh wrote:

>i've noticed that it saves the ip onto the character of anyone who tries
>to log in with someone i'm not sure what that serves, but i want it to
>only save when they enter the correct password how would i do that?

interpreter.c:

      if (strncmp(CRYPT(arg, GET_PASSWD(d->character)), GET_PASSWD(d->character), MAX_PWD_LENGTH)) {
        sprintf(buf, "Bad PW: %s [%s]", GET_NAME(d->character), d->host);
        mudlog(buf, BRF, LVL_GOD, TRUE);
        GET_BAD_PWS(d->character)++;
-       save_char(d->character, NOWHERE);
        if (++(d->bad_pws) >= max_bad_pws) {    /* 3 strikes and you're out. */
          SEND_TO_Q("Wrong password... disconnecting.\r\n", d);
          STATE(d) = CON_CLOSE;
        } else {
          SEND_TO_Q("Wrong password.\r\nPassword: ", d);
          echo_off(d);
        }
        return;
      }

Delete the 'save_char()'. NOTE: That'll also remove the bad password
notification. Alternatively you could modify save_char().

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | 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/05/01 PST