Re: Command Queues

From: Nick Watson (pidarve@yahoo.com)
Date: 01/10/00


> >I'm wanting to have 2 command queues, one for
> commands
> >that create lag, one for ones that don't. I can't
> >very well parse it through the command interp t
> check
> >for a wait state, as I would have to pass char_data
> >and at login, we don't have anything but a
> descriptor.
> > This is so that players may have queued 10 kicks,
> or
> >20 fireballs and would still beable to see the who
> >screen, and talk to the group. Help please?
>
:It seems to me the easiest way to do this is to havea flag for
 :each command in your command_info structure to indicate if
 :it's a command that gets executed immediately or queued. If
 :the command gets queued, you can create (or append it) to a
 :per-user command queue. This command queue can be inspected
 :at a time you specify (based on wait state, I would expect) rather
 :than immediately. If it's the first command in the
 :queue, of course
 :execute it immediately, but perhaps leave it in the queue until
:the wait state for it has surpassed.


I have tried this, and when I tried to log on in seg faulted, I think it was because the command_interp uses char_data, which ofcos is undefined at login.

I might just have to try this again, probably had something a tad wrong.




---------------------------------
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.

     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT