[Code] OLC Flags in WHO. (Yes, easy, but I'm sure someone needs it.)

From: Tadrith, the Silver Gryphon (tadrith@GATEKEEP.NET)
Date: 01/17/98


        Actually, I believe the docs say Circle was designed for easy coding,
not sharing and helping. Telling newbie coders to do it themselves is
probably one of the best things they can do for them, because a year ago
I was in the same position. After being rebuked well on the list, I went
out and finally did it myself. Now I can code with ease, and I'm
relatively experienced in it. Well, anyways, here's a bit of code that's
easy to do, but would probably benefit someone. It will show an OLC flag
in the WHO, and tell which OLC utility they are in. NOTE: My WHO is not
stock, but this should work fine. I am using BPL11. A thanks to Essex of
Pandemonium for this one, as he helped me fix a really stupid mistake of
mine. :)


**** OLC Flags in the WHO
*****************************************************


1. Find in the do_who function of act.informative.c:

    if (d->connected)
       continue;

   Replace with:

        if ((d->connected) &&
           (d->connected!=CON_MEDIT) &&
           (d->connected!=CON_OEDIT) &&
           (d->connected!=CON_REDIT) &&
           (d->connected!=CON_SEDIT) &&
           (d->connected!=CON_ZEDIT))
               continue;

2. Find:

      if ((PLR_FLAGGED(wch, PLR_WRITING))
       strcat(buf, " (writing)");

   Replace with:

       if ((PLR_FLAGGED(wch, PLR_WRITING)) &&
              (d->connected != CON_MEDIT) &&
              (d->connected != CON_REDIT) &&
              (d->connected != CON_ZEDIT) &&
              (d->connected != CON_SEDIT) &&
              (d->connected != CON_OEDIT))
           strcat(buf, " (writing)");

3.  Find:

      if (PLR_FLAGGED(wch, PLR_KILLER))
      strcat(buf, "&R (KILLER)&n");

   Add DIRECTLY AFTER:

     if (d->connected == CON_OEDIT)
      strcat(buf, " (OLC - OEdit)");
    if (d->connected == CON_MEDIT)
      strcat(buf, " (OLC - MEdit)");
    if (d->connected == CON_ZEDIT)
      strcat(buf, " (OLC - ZEdit)");
    if (d->connected == CON_SEDIT)
      strcat(buf, " (OLC - SEdit)");
    if (d->connected == CON_REDIT)
      strcat(buf, " (OLC - REdit)");

************************** End Pointless Snippet ********************


That should be it. If you have problems, just e-mail me.


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