Re: saving ip addresses

From: George Greer (
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?


      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);
-       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);

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

George Greer

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/05/01 PST