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

# Re: How do I protect a wiz-owned :enterfunc?

- Date: Wed, 27 Nov 1996 17:28:25 PST
- From:
- cc: moo-cows.PARC@xerox.com
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-to: <329CD8AB.10C2@world.std.com>

    	On Wed, 27 Nov 1996, Francis Litterio wrote:

    	I must protect the verb so that it can only be called by the
    	server and never by a programmer or another verb.  But when the
    	1.8.0p5 server calls :enterfunc, caller and player are both set to
    	something _other_ than #-1.
    	What check can I do to enforce that the :enterfunc is only
    	called from the server?

    Well, if you want to be really sure (and probably there's a better way):
      last_activ = callers()[$];
      if (last_activ[4]!=#-1 && last_activ[3]!=#-1 && last_activ[2]==""))
        "caller was not a builtin function";
        raise(E_PERM);
      endif
      ...

Follow-Ups:

- Re: How do I protect a wiz-owned :enterfunc?

- From: Gevan Dutton <shanos@es.co.nz>

- Re: How do I protect a wiz-owned :enterfunc?

- From: Jay Carlson <nop@nop.com>

References:

- How do I protect a wiz-owned :enterfunc?

- From: Francis Litterio <franl@world.std.com>

- Prev: Re: How do I protect a wiz-owned :enterfunc?
- Next: Re: How do I protect a wiz-owned :enterfunc?
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index