[DGD] Aliases & Stacked commands

Michael McKiel crashnbrn71 at yahoo.ca
Wed Mar 24 21:23:39 CET 2004


 --- Par Winzell <zell at skotos.net> wrote: > Bart van Leeuwen wrote:
> 
> > I think you really want something like this_player() because 'users' are
> > not the only livigns that can use 'commands' on your average mud, which
> > means to me that commands should never ever depend on this_user() since
> > they will fail when used by a living thats not linked to any user.
> > Of course there can be exceptions for security reasons, but those are
> > cases where runnign such a command from an alias would not be a good idea
> > either I believe.
> 
> I certainly agree that a living object should not depend on having a 
> connected user for any of its in-world actions. In Skotos we separated 
> commands and actions entirely -- commands belong to the text interface 
> layer, actions are in the virtual world. Commands cause actions. NPC 
> brains cause actions.

My lib doesn't rely on 'this_user()' for actions. The command-bin uses
previous_object() - whatever tried to perform the command - which can be a
mob a player or any object -- objects will be able to talk/do soul's; livings
- mobs & players will be able to do any other user action, user's can
potentially do wizard or implementor actions.
( fyi the command.h defines creep() to previous_object() )

The place where I did check for this_user() - possibly influenced by Melville
- and could be removed if we just sent along the current acting object was
for echo(). ie the say command:
     echo(creep()->Name()+"says: "+msg);
     message("You say: "+msg);
where echo's predeclaration would be:
echo(string msg, varargs object *excluded, mixed where);

if I passed: 
    echo(creep()->Name()+"says: "+msg, ({ creep() }));
then we wouldn't need to do:
    obj = this_user() ? this_user() : forced_user() ? forced_user() :
this_object();

where 'obj' is set to be the one object that definitely shouldn't see the
incoming text caused by an echo.

I definitely need to chek if all forced_user() will get used for is echo, cuz
then it doesn't serve much pupose, but allowing you to skip sending the one
excluded objects to the echo() function. which is pretty redundant heh.

And how echo() checks for this_user()/etc may have to change anyways when I
look at stacked commands, since I dont think that'd work at all then.

Good discussion though,, brought up some points I certainly hadn't thought
through :)


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list