Email Addresses in PlayerFile

From: Brian Christopher Guilbault (
Date: 09/22/96


After a WHOLE LOT of playing around, I fianlly got my email code to 
work...mostly (thanks to the generous few who responded). What happens is 
that the first player to log in after I remove the playerfil has their 
email address stored fine. Everything works great. After that, the next 
player who connects gets all the way to the point where he can type in 
his mail address, but when I press enter, it seg faults. I'm having 
problems with gdb right now, so I can't check it :-( Here's the code from 
interpreter.c. It's not all of the meail code, but as far as I can tell 
this is where it is crashing since it is in character creation.

  case CON_QCLASS:
    load_result = parse_class(*arg, 0);
    if (load_result == CLASS_UNDEFINED) {
      SEND_TO_Q("\r\nThat's not a class.\r\nClass: ", d);

    } else {

      GET_CLASS(d->character) = load_result;
      SEND_TO_Q("\r\nPress ENTER to roll your character's stats.\n\r ", d);

      if (GET_PFILEPOS(d->character) < 0)
        GET_PFILEPOS(d->character) = create_entry(GET_NAME(d->character));
      save_char(d->character, real_room(GET_LOADROOM(d->character)));
      SEND_TO_Q(email_alert, d);
      STATE(d) = CON_EMAIL;

/* Email for the player */

    case CON_EMAIL:           /* Enter e-mail address          */

/* No real email address should be longer than 80 characters. */

    if (strlen(arg) > EMAIL_LENGTH) {
      SEND_TO_Q("Address too long.\r\n", d);
      SEND_TO_Q("Enter e-mail address: ", d);

/* Save the email address to the playerfile */
    CREATE(d->character->, char, strlen(arg) + 1);
    strncpy(d->character->, arg, EMAIL_LENGTH);
    GET_EMAIL(d->character) = '\0';



Brian Guilbault - GMI Engineering Institute
QuarantineMUD: Telnet to 4000

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST