MOO-cows Mailing List Archive


Re: [PROG] changing the value of player

TEf writes:

>@verb me:call_as this none this rxd $archwizard
>@program me:call_as
>player = args[1];
>object = args[2];
>verb = args[3];
>args = args[4..length(args)];
>return object:(verb)(@args);
>The problem is, the new value of player doesn't survive because of the
> set_task_perms() (assume that args[1] was a non-wizard).  From looking at
> the server code, a set_task_perms() replaces the value that was the original
> permissions, so there is no way to check this and have the value of player
> survive.  Was it intentional to have it act this way?  If so, then being
> able to change the value of player without being able to change the task's
> permissions is kind of useless, since you can't get player and caller_perms()
> to match for non-wizard objects.  Any ideas?

Well, I can hardly call this an elegant option, but you can make it in two
The 1st step modifies the value of player, and calls the 2nd step.
The 2nd step sets the task perms, and calls object:(verb)(etc).
It works. Of course, the security should be better than that in the
simplified code posted. :)

Gustavo Glusman               Founder/administrator of BioMOO
-- BioMOO: telnet 8888

Home | Subject Index | Thread Index