[DGD] Aliases & Stacked commands

Jay Shaffstall jshaffst at netwalk.com
Wed Mar 24 00:35:40 CET 2004


>The problem is that when the alias is expanded all the actions are performed,
>and perhaps too quickly - meaning if it was a client-side alias, each bit
>would get re-sent to be passed thru the given user's receive_message() but
>since this is an in-game/system alias the active thread wont end until the
>whole alias has been processed.


>     Has anyone else tackled this problem, or have any different suggestions
>on how one might go about it? Would a call_out that calls into a user's
>receive_message in essence make them this_user() ?

I use a queue of command actions, executed on a timed interval using a 
call_out on the user object itself.  Since the call_out is on the user 
object, I don't need to worry about this_user (), I just call methods in 
the current object, which includes methods for sending messages to the 
user.  The only place in the flow where this_user () might get called for 
me is if a compile error happens...off the top of my head, I don't recall 
that happening in a chained command, so I can't say whether this_user is 
set or not.

It should be relatively easy to write some code to test this, though, in 
whatever mudlib you're writing.

As you note, getting this sort of thing to work correctly is 
non-trivial.  There are lots of boundary cases that keep popping up, even 
once you have the basic mechanics in place.

Jay


_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list