forked from fuzzball-muck/fuzzball-muf
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@program cmd-@purge
1 99999 d
1 i
$include $lib/strings
$include $lib/match
: main
"me" match me !
"=" split strip
"yes" stringcmp if
"Use \"@purge <player>=yes\" to purge a player's possessions."
me @ swap notify pop exit
then
strip noisy_pmatch
dup not if pop exit then
dup me @ dbcmp not
me @ "wizard" flag? not and if
"Permission denied." tell
pop exit
then
"Beginning purge." tell
0 sleep
dbtop begin
int 1 - dup 0 > while dbref
dup ok? not if continue then
dup player? if continue then
over over owner dbcmp if dup recycle 0 sleep then
repeat pop pop
me @ "Purge complete." notify
;
.
c
q
@register #me cmd-@purge=tmp/prog1
@set $tmp/prog1=3
@set $tmp/prog1=W
@action @purge=#0=tmp/exit1
@link $tmp/exit1=$tmp/prog1
@register #me =tmp