Re: Hedit Update and another Gedit Question

From: ;P (siv@CYBERENET.NET)
Date: 11/23/97


> Where it has:
>   /*. Check whatever it is isn't already being edited .*/
>   for (d = descriptor_list; d; d = d->next)
>     if (d->connected == olc_scmd_info[subcmd].con_type)
>       if (d->olc && (OLC_NUM(d) == number) && (number != NOTHING))

here's what my olc.c says at this point..

  /*. Check whatever it is isn't already being edited . */
  for (d = descriptor_list; d; d = d->next)
    if (d->connected == olc_scmd_info[subcmd].con_type)
      if ((number != NOTHING) && d->olc && OLC_NUM(d) == number) {
        if (subcmd == SCMD_OLC_AEDIT)
          sprintf(buf, "Actions are already being editted by %s.\r\n",
                  (CAN_SEE(ch, d->character) ? GET_NAME(d->character) : "someone"));
        else if (subcmd == SCMD_OLC_HEDIT)
          sprintf(buf, "Help files are already being editted by %s.\r\n",
                  (CAN_SEE(ch, d->character) ? GET_NAME(d->character) : "someone"));
        else
          sprintf(buf, "That %s is currently being edited by %s.\r\n",
                  olc_scmd_info[subcmd].text, GET_NAME(d->character));
        send_to_char(buf, ch);
        return;
      }
  d = ch->desc;

OLC_NUM will be 999 for aedit, 666 for hedit, and whatever the
room/obj/mob vnum (rnum?) is...so the code above makes it so that no two
people can edit socials at the same time, no two people can edit help
entries (i gotta stop calling them files) at the same time, and no two
people can edit mobs/rooms/objs with the same numbers at the same time..all
i can say is check your parens and brackets..

siv


     +------------------------------------------------------------+
     | 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/08/00 PST