Re: Session-only flag

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


On Tue, 21 Aug 2001, Shane Lee wrote:

>Hi all! Sure hope one or three of you can help me out with this.
>
>I'm wanting to add a session-only flag that gets set when the connection
>is made (first thing in nanny), which will go away when the session is
>over. I was thinking of something like the ((d)->host) kinda thing, but I
>know better than to mess with descriptor data. I tried something like
>this long ago and found the experience quite painful.

Painful? You assign to it once and forget about it.

>It can't be a normal flag, because the connection doesn't have a
>character in nanny() as a rule. I first tried a simple integer at the top
>of nanny, changing it as needed, but once the player has reached
>CON_PLAYING, the gig is up. I need something more global, without
>destroying my descriptor data.

ch->desc->your_flag_here

Or if you like being funny:

ch->desc->character->desc->your_flag_here

--
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/06/01 PST