MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Caller & Player



>Many security problems seem to be due to the difference between the 
>caller and the player. I mean, most of the verbs check the player.
>But, I can't really see the difference between Caller and Player object 
>while executing a verb.

It's questionable to use "caller" if you don't know what it means. :-)
While "caller" == "player" for the first verb called by a typed command,
it's not necessarily so for later verbs.  Consider this series of verbs:

  player types a command which calls @rename (defined on self)
  which calls :set_name on the object to be renamed
  which calls $perm_utils to check permissions

Within @rename, caller==player.  Within :set_name, caller==player,
because @rename is a verb -on- player.  Within the $perm_utils call,
however, caller will be the object to be renamed, because -that- is
where the verb was called from.

Keep reading the programmer's manual.  There's more discussion of
"caller".  Briefly, it's the location of the verb which invoked the
verb presently running (or 'player' for typed commands).

Seth / Blackbriar
----------------------------------------------------------------------
Seth I. Rich - sir@po.cwru.edu
                                 There is nothing more precious than
Rabbits on walls, no problem.    a tear of true repentance.



Home | Subject Index | Thread Index