MOO-cows Mailing List Archive

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

Re: temporary wizbit



On Tue, 16 Apr 1996, Seth I. Rich wrote:

> The way I intend to do this is to have a code segment (where #110 is
> our sample temporary wizard):
>   #110.wizard = 1;
>   set_task_perms(#110);
>   shutdown(); /* whatever, maybe a message here */
> 
> and, as the first line in $server_started:
>   #110.wizard = 0;

Here's my MOO 1.8.0 version of implementing the idea...

;add_property($server_options, "protect_shutdown", 1, {player, "r"})
;add_verb(#0, {player, "rdx", "bf_shutdown"}, {"this","none","this"})
.program #0:bf_shutdown
set_task_perms((cp = caller_perms()) == #110 ? #2 | cp);
return shutdown(@args);
.

As far as I know, the code here will work in LambdaMOO version 1.8.0.
You will probably still want to make a nice way to do this (so that #110
or whoever the person is can just type '@shutdown Sorry, gotta shutdown.',
but then why even bother with this stuff?  Just make that verb have
wizard permissions and check for a person with appropriate permissions).

--Nate

------how original-a signature at the end of every email message------
Nate Massey    G -d+ H s+:- !g(+) p?+ au- a-- w++ v?(*) C++ SU++ HU P+
nmassey@lfa.lfc.edu   L+ 3- N+ E K- W M@ !V po Y@ t+ 5 !j R- G? tv- b-
http://www.lfa.lfc.edu/~nmassey/   B+(--) e u** h!(*) f* r++(--) n@ y?



References:

Home | Subject Index | Thread Index