generic wizard #57

Parent #58Owner #2Flags readSource RPG Core/rpgcore-patched.db

Aliases: generic wizard, player

39 verbs · 133 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
@chown*#any any anyrd#5759
@shoutany any anyrd#5714
@grant @grants* @transferany at/to anyrd#5769
@programmerany none nonerd#5724
make-core-databaseany none nonerd#57143
@shutdownany any anyrd#5748
@dump-d*atabasenone none nonerd#573
@who-callsany any anyrd#577
mcd_2none none nonerxd#57111
@toad @toad! @toad!!any any anyrd#5754
@untoad @detoadany any anyrd#5724
@quotaany is anyrd#5741
@playersany any anyrd#57114
kill_aux_wizard_parsethis none thisrxd#5726
@grepcore @egrepcoreany any anyrd#5710
@net-who @@whoany any anyrd#5721
@make-playerany any anyrd#5713
@abort-sh*utdownany any anyrd#5714
toad_msg toad_victim_msg programmer_msg programmer_victim_msg newt_msg newt_victim_msgthis none thisrxd#5712
movetothis none thisrxd#572
@newtany any anyrd#5722
@unnewt @denewt @get-betterany any anyrd#5722
@registerany any anyrd#577
@new-password @newpasswordany is anyrd#5712
@logany any anyrd#5717
@guestsany none nonerd#5777
@rn mail_catch_up check_mail_lists current_message set_current_message get_current_message make_current_message kill_current_message @nnnone none nonerxd#579
@blacklist @graylist @redlist @unblacklist @ungraylist @unredlist @spooflist @unspooflistany any anyrd#57171
@corifyany as anyrd#5732
@make-guestany none nonerd#5747
@temp-newtany for/about anyrd#5725
@deprog*rammerany any anyrd#5734
display_listthis none thisrxd#5730
parse_templist_durationthis none thisrxd#5729
check_site_entriesthis none thisrxd#5746
@lock-login @unlock-login @lock-login!any any anyrd#5725
toad_cleanupthis none thisrxd#575
@summonany none nonerd#5723
@fullpropsany none nonerd#5756

Properties

PropertyDefinerFlagsOwnerValue
newt_victim_msg#57rc#2""
newt_msg#57rc#2"%n @newts %d (%[#d])"
public_identity#57rc#2#-1
programmer_msg#57rc#2"%d is now a programmer."
programmer_victim_msg#57rc#2"You are now a programmer."
toad_victim_msg#57rc#2"Have a nice life..."
toad_msg#57rc#2"%n @toads %d (%[#d])"
mail_identity#57c#2#-1
advertised#57rc#21
eval_subs#58r#36<clear>
eval_ticks#58r#36<clear>
eval_env#58r#36<clear>
prog_options#58rc#2<clear>
bot#58rc#2<clear>
build_options#4rc#2<clear>
at_room_width#90rc#2<clear>
at_number#90rc#2<clear>
join_msg#90rc#2<clear>
object_port_msg#90rc#2<clear>
victim_port_msg#90rc#2<clear>
thing_arrive_msg#90rc#2<clear>
othing_port_msg#90rc#2<clear>
thing_port_msg#90rc#2<clear>
player_arrive_msg#90rc#2<clear>
oplayer_port_msg#90rc#2<clear>
player_port_msg#90rc#2<clear>
self_arrive_msg#90rc#2<clear>
oself_port_msg#90rc#2<clear>
self_port_msg#90rc#2<clear>
rooms#90r#36<clear>
refused_origins#90r#36<clear>
refused_extra#90r#36<clear>
default_refusal_time#90r#36<clear>
report_refusal#90r#36<clear>
refused_actions#90r#36<clear>
refused_until#90r#36<clear>
page_refused#90r#36<clear>
page_refused_msg#90rc#2<clear>
whisper_refused_msg#90rc#2<clear>
mail_refused_msg#90rc#2<clear>
death_msg#91rc#2<clear>
alive#91r#36<clear>
alert#91r#36<clear>
mobile#91r#36<clear>
wielded#91r#36<clear>
last_paged#91r#36<clear>
last_healed#91r#36<clear>
followed_by#91r#36<clear>
following#91r#36<clear>
free_points#91r#361.36749999999999
stats#91r#36<clear>
stats_current#91r#36<clear>
skills#91r#36<clear>
race#91r#36<clear>
org#91r#36<clear>
money#91r#36<clear>
follow_msg#91rc#2<clear>
stopfollow_msg#91rc#2<clear>
searching#91r#36<clear>
languages#91r#36{{#142}, {2.0}}
speaking#91r#36<clear>
remembered_names#91r#36{}
short_desc_msg#91r#36""
_mail_task#40rc#2<clear>
messages_going#40c#2<clear>
mail_lists#40rc#2<clear>
mail_notify#40rc#2<clear>
mail_forward#40rc#2<clear>
mail_options#40rc#2{}
message_keep_date#40rc#2<clear>
messages_kept#40rc#2<clear>
current_message#40c#2{0, -1300000000}
messages#40c#2<clear>
ansi_options#95r#36<clear>
replace_codes#95r#36<clear>
features#6r#36<clear>
previous_connection#6#2<clear>
email_address#6#2<clear>
last_disconnect_time#6r#2<clear>
help#6rc#2#23
more_msg#6rc#2<clear>
linetask#6r#36<clear>
linesleft#6r#36<clear>
linebuffer#6#36<clear>
pagelen#6r#36<clear>
owned_objects#6r#2<clear>
linelen#6r#36<clear>
current_folder#6c#2<clear>
all_connect_places#6#2<clear>
last_connect_place#6#2<clear>
brief#6rc#2<clear>
lines#6c#2<clear>
page_absent_msg#6rc#2<clear>
pq#6rc#2<clear>
pqc#6rc#2<clear>
page_origin_msg#6rc#2<clear>
page_echo_msg#6rc#2<clear>
edit_options#6rc#2<clear>
last_connect_time#6r#2<clear>
ownership_quota#6#36<clear>
gender#6rc#2<clear>
prc#6rc#2<clear>
ppc#6rc#2<clear>
poc#6rc#2<clear>
psc#6rc#2<clear>
pr#6rc#2<clear>
pp#6rc#2<clear>
po#6rc#2<clear>
ps#6rc#2<clear>
home#6rc#2#62
password#6#2"really impossible password to type"
gaglist#6rc#2<clear>
paranoid#6rc#2<clear>
display_options#6rc#2<clear>
verb_subs#6rc#2<clear>
first_connect_time#6r#2<clear>
size_quota#6#36<clear>
last_password_time#6#2<clear>
last_connect_attempt#6#2<clear>
page_count_start_time#6r#2<clear>
ping_task#6r#36<clear>
value_base#102r#2<clear>
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#2<clear>
key#1c#2<clear>
aliases#1r#2{"generic wizard", "player"}
description#1rc#2"You see a wizard who chooses not to reveal its true appearance."
object_size#1r#36{66819, -1090650497}
html#1rc#2<clear>

Ancestry

Ancestors (nearest first): #58 generic programmer#4 generic builder#90 Frand's administrator class#91 generic gamer#40 Generic Mail Receiving Player#95 ANSI PC#6 generic player#102 subthing#1 Root Class

Children: #2 Wizard

Call graph

calls n57_0 #57:@chown*# n6_10 #6:notify n57_0->n6_10 n20_20 #20:match_player n57_0->n20_20 n56_1 #56:player_match_result n57_0->n56_1 n59_14 #59:parse_verbref n57_0->n59_14 n91_42 #91:my_match_object n57_0->n91_42 n56_0 #56:object_match_failed n57_0->n56_0 n59_1 #59:toint n57_0->n59_1 n59_13 #59:parse_propref n57_0->n59_13 n24_3 #24:set_property_owner n57_0->n24_3 n24_2 #24:set_owner n57_0->n24_2 n57_1 #57:@shout n57_1->n6_10 n57_2 #57:@grant n57_2->n6_10 n57_2->n20_20 n57_2->n56_1 n57_2->n91_42 n57_2->n56_0 n57_2->n24_3 n57_2->n24_2 n6_11 #6:notify_lines n57_2->n6_11 n6_18 #6:tell n57_2->n6_18 n20_59 #20:name_and_number n57_2->n20_59 n56_8 #56:suspend_if_needed n57_2->n56_8 n57_3 #57:@programmer n57_3->n6_10 n57_3->n20_20 n57_3->n56_1 n24_36 #24:check_prog_restricted n57_3->n24_36 n56_4 #56:yes_or_no n57_3->n56_4 n20_34 #20:pronoun_sub n57_3->n20_34 n24_0 #24:set_programmer n57_3->n24_0 n80_10 #80:get_quota n57_3->n80_10 n57_18 #57:toad_msg n57_3->n57_18 n52_5 #52:isa n57_3->n52_5 n57_18->n20_34 n57_4 #57:make-core-database n57_4->n6_10 n57_4->n52_5 n80_3 #80:bi_create n57_4->n80_3 n52_1 #52:all_properties n57_4->n52_1 n41_0 #41:set n57_4->n41_0 n56_7 #56:running_out_of_time n57_4->n56_7 n52_18 #52:defines_verb n57_4->n52_18 n57_8 #57:mcd_2 n57_4->n57_8 n57_8->n6_10 n57_8->n56_7 n57_8->n57_8 n55_17 #55:assoc n57_8->n55_17 n52_3 #52:has_callable_verb n57_8->n52_3 n80_19 #80:object_bytes n57_8->n80_19 n24_11 #24:initialize_owned n57_8->n24_11 n80_21 #80:summarize_one_user n57_8->n80_21 n57_5 #57:@shutdown n57_5->n6_10 n57_5->n56_8 n57_5->n56_4 n59_37 #59:task_valid n57_5->n59_37 n50_68 #50:fill_string n57_5->n50_68 n43_7 #43:english_time n57_5->n43_7 n57_6 #57:@dump-d*atabase n57_6->n6_10 n57_7 #57:@who-calls n57_7->n6_10 n59_25 #59:find_verbs_containing n57_7->n59_25 n57_9 #57:@toad n57_9->n6_10 n57_9->n20_20 n57_9->n56_1 n57_9->n52_5 n20_56 #20:first_word n57_9->n20_56 n10_21 #10:listname n57_9->n10_21 n24_15 #24:rename_all_instances n57_9->n24_15

Showing 48 of 119 verbs; 71 not shown.

Source

@chown*#

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1if ((!player.wizard) || (player != this))
2player:notify("Sorry.");
3return;
4endif
5set_task_perms(player);
6args = setremove(args, "to");
7if ((length(args) != 2) || (!args[2]))
8player:notify(tostr("Usage:  ", verb, " <object-or-property-or-verb> <owner>"));
9return;
10endif
11what = args[1];
12owner = $string_utils:match_player(args[2]);
13bynumber = verb == "@chown#";
14if ($command_utils:player_match_result(owner, args[2])[1])
15elseif (spec = $code_utils:parse_verbref(what))
16object = this:my_match_object(spec[1]);
17if (!$command_utils:object_match_failed(object, spec[1]))
18vname = spec[2];
19if (bynumber)
20vname = $code_utils:toint(vname);
21if (vname == E_TYPE)
22return player:notify("Verb number expected.");
23elseif ((vname < 1) || (vname > length(verbs(object))))
24return player:notify("Verb number out of range.");
25endif
26endif
27info = `verb_info(object, vname) ! ANY';
28if (info == E_VERBNF)
29player:notify("That object does not define that verb.");
30elseif (typeof(info) == ERR)
31player:notify(tostr(info));
32else
33try
34result = set_verb_info(object, vname, listset(info, owner, 1));
35player:notify("Verb owner set.");
36except e (ANY)
37player:notify(e[2]);
38endtry
39endif
40endif
41elseif (bynumber)
42player:notify("@chown# can only be used with verbs.");
43elseif (index(what, ".") && (spec = $code_utils:parse_propref(what)))
44object = this:my_match_object(spec[1]);
45if (!$command_utils:object_match_failed(object, spec[1]))
46pname = spec[2];
47e = $wiz_utils:set_property_owner(object, pname, owner);
48if (e == E_NONE)
49player:notify("+c Property owner set.  Did you really want to do that?");
50else
51player:notify(tostr(e && "Property owner set."));
52endif
53endif
54else
55object = this:my_match_object(what);
56if (!$command_utils:object_match_failed(object, what))
57player:notify(tostr($wiz_utils:set_owner(object, owner) && "Object ownership changed."));
58endif
59endif

@shout

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1if (caller != this)
2raise(E_PERM);
3endif
4set_task_perms(player);
5if ((length(args) == 1) && (argstr[1] == "\""))
6argstr = args[1];
7endif
8shout = $gender_utils:get_conj("shouts", player);
9for person in (connected_players())
10if (person != player)
11person:notify(tostr(player.name, " ", shout, ", \"", argstr, "\""));
12endif
13endfor
14player:notify(tostr("You shout, \"", argstr, "\""));

@grant @grants* @transfer

Spec any at/to anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@grant <object> to <player>";
2"@grants <object> to <player>   --- same as @grant but may suspend.";
3"@transfer <expression> to <player> -- like 'grant', but evalutes a possible list of objects to transfer, and modifies quota.";
4"Ownership of the object changes as in @chown and :set_owner (i.e., .owner and all c properties change).  In addition all verbs and !c properties owned by the original owner change ownership as well.  Finally, for !c properties, instances on descendant objects change ownership (as in :set_property_owner).";
5if ((!player.wizard) || (player != this))
6player:notify("Sorry.");
7return;
8endif
9set_task_perms(player);
10if ((!iobjstr) || (!dobjstr))
11return player:notify(tostr("Usage:  ", verb, " <object> to <player>"));
12endif
13if ($command_utils:player_match_failed(newowner = $string_utils:match_player(iobjstr), iobjstr))
14"...newowner is bogus...";
15return;
16endif
17if (verb == "@transfer")
18objlist = player:eval_cmd_string(dobjstr, 0);
19if (!objlist[1])
20player:notify(tostr("Had trouble reading `", dobjstr, "': "));
21player:notify_lines(@objlist[2]);
22return;
23elseif (typeof(objlist[2]) == OBJ)
24objlist = objlist[2..2];
25elseif (typeof(objlist[2]) != LIST)
26player:notify(tostr("Value of `", dobjstr, "' is not an object or list:  ", toliteral(objlist[2])));
27return;
28else
29objlist = objlist[2];
30endif
31elseif ($command_utils:object_match_failed(object = this:my_match_object(dobjstr), dobjstr))
32"...object is bogus...";
33return;
34else
35objlist = {object};
36endif
37"Used to check for quota of newowner, but doesn't anymore, cuz the quota check doesn't work";
38suspendok = verb != "@grant";
39player:tell("Transferring ", toliteral(objlist), " to ", $string_utils:nn(newowner));
40for object in (objlist)
41$command_utils:suspend_if_needed(0);
42same = object.owner == newowner;
43for vnum in [1..length(verbs(object))]
44info = verb_info(object, vnum);
45if (!((info[1] != object.owner) && (valid(info[1]) && is_player(info[1]))))
46same = same && (info[1] == newowner);
47set_verb_info(object, vnum, listset(info, newowner, 1));
48endif
49endfor
50for prop in (properties(object))
51if (suspendok && ((ticks_left() < 5000) || (seconds_left() < 2)))
52suspend(0);
53endif
54info = property_info(object, prop);
55if (!(index(info[2], "c") || (((info[1] != object.owner) && valid(info[1])) && is_player(info[1]))))
56same = same && (info[1] == newowner);
57$wiz_utils:set_property_owner(object, prop, newowner, suspendok);
58endif
59endfor
60if (suspendok)
61suspend(0);
62endif
63$wiz_utils:set_owner(object, newowner, suspendok);
64if (same)
65player:notify(tostr(newowner.name, " already owns everything ", newowner.ps, " is entitled to on ", object.name, "."));
66else
67player:notify(tostr("Ownership changed on ", $string_utils:nn(object), ", verb, properties and descendants' properties."));
68endif
69endfor

@programmer

Spec any none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2dobj = $string_utils:match_player(dobjstr);
3if (dobj == $nothing)
4player:notify(tostr("Usage:  ", verb, " <playername>"));
5elseif ($command_utils:player_match_result(dobj, dobjstr)[1])
6elseif ($wiz_utils:check_prog_restricted(dobj))
7return player:notify(tostr("Sorry,", dobj.name, " is not allowed to be a programmer."));
8elseif ((dobj.description == $player.description) && (!$command_utils:yes_or_no($string_utils:pronoun_sub("@Programmer %d despite %[dpp] lack of description?"))))
9player:notify(tostr("Okay, leaving ", dobj.name, " !programmer."));
10return;
11elseif (result = $wiz_utils:set_programmer(dobj))
12player:notify(tostr(dobj.name, " (", dobj, ") is now a programmer.  ", dobj.ppc, " quota is currently ", $quota_utils:get_quota(dobj), "."));
13player:notify(tostr(dobj.name, " and the other wizards have been notified."));
14if (msg = this:programmer_victim_msg())
15dobj:notify(msg);
16endif
17if ($object_utils:isa(dobj.location, $room) && (msg = this:programmer_msg()))
18dobj.location:announce_all_but({dobj}, msg);
19endif
20elseif (result == E_NONE)
21player:notify(tostr(dobj.name, " (", dobj, ") is already a programmer..."));
22else
23player:notify(tostr(result));
24endif

make-core-database

Spec any none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1if (!player.wizard)
2player:notify("Nice try, but permission denied.");
3return;
4elseif (args == {})
5player:notify(tostr("Continuing with this command will destroy all but the central core of the database.  If you're really sure that you want to do this, type '", verb, " ", toint(o = $quota_utils:bi_create(#1)), "' now."));
6recycle(o);
7return;
8elseif (toobj(toint(args[1])) != max_object())
9player:notify(tostr("Nice try, but you mistyped the self-destruct password.  Type '", verb, "' again to get a new password."));
10return;
11elseif (verb_info($wiz, verb)[1] != player)
12player:notify("Sorry, but you must own this verb in order to use it.");
13return;
14endif
15"----------------------------------------";
16player:notify("Blowing away $local...");
17$local = #-1;
18$dead_zone = $player_start;
19$reaper = player;
20$default_holder = $hacker;
21"----------------------------------------";
22player:notify("Identifying objects to be saved...");
23saved = {#0, player};
24saved_props = {};
25for p in (properties(#0))
26v = #0.(p);
27if ((typeof(v) == OBJ) && valid(v))
28saved = setadd(saved, v);
29saved_props = {@saved_props, p};
30endif
31endfor
32for o in (saved)
33"Also save non-$ objects that are ancestors of $ objects";
34"but leave out non-$ player classes and room classes";
35"Come to think of it, what's the point of this? Can't we just give the generic gendered object a $-name? --Nosredna";
36if ((!$object_utils:isa(o, $player)) && (!$object_utils:isa(o, $room)))
37p = parent(o);
38while (valid(p))
39saved = setadd(saved, p);
40p = parent(p);
41endwhile
42endif
43endfor
44$player_class = $rpgamer;
45"----------------------------------------";
46player:notify("Killing all queued tasks ...");
47for t in (queued_tasks())
48kill_task(t[1]);
49endfor
50"----------------------------------------";
51player:notify("Stripping you of any personal verbs and/or properties ...");
52suspend(0);
53for i in [1..length(verbs(player))]
54delete_verb(player, 1);
55endfor
56for p in (properties(player))
57delete_property(player, p);
58endfor
59chparent(player, $wiz);
60for p in ($object_utils:all_properties(player))
61clear_property(player, p);
62endfor
63player.name = "Wizard";
64player.aliases = {"Wizard"};
65player.description = "";
66player.key = 0;
67player.ownership_quota = 12720;
68player.size_quota = {2500000, 0, 0, 1};
69$hacker.ownership_quota = 12720;
70$hacker.size_quota = {2500000, 0, 0, 1};
71player.password = 0;
72player.last_password_time = 0;
73$gender_utils:set(player, "neuter");
74"----------------------------------------";
75suspend(0);
76player:notify("Making you or $hacker the owner of every saved object, verb and property ...");
77for i in [1..length(saved)]
78if ($command_utils:running_out_of_time())
79suspend(0);
80(random(4) - 1) || player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ..."));
81endif
82o = saved[i];
83if (valid(o.owner) && o.owner.wizard)
84o.owner = player;
85else
86o.owner = $hacker;
87endif
88old_verbs = {};
89for j in [1..length(verbs(o))]
90if ((seconds_left() < 2) || (ticks_left() < 4000))
91suspend(0);
92(random(4) - 1) || player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ..."));
93endif
94info = verb_info(o, j);
95if (valid(info[1]) && info[1].wizard)
96info = listset(info, player, 1);
97else
98info = listset(info, $hacker, 1);
99endif
100set_verb_info(o, j, info);
101if (index(info[3], "(old)"))
102old_verbs = {j, @old_verbs};
103endif
104endfor
105for vname in (old_verbs)
106delete_verb(o, vname);
107endfor
108for p in ($object_utils:all_properties(o))
109if ((seconds_left() < 2) || (ticks_left() < 4000))
110suspend(0);
111(random(4) - 1) || player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ..."));
112endif
113info = property_info(o, p);
114if (valid(info[1]) && info[1].wizard)
115info = listset(info, player, 1);
116else
117info = listset(info, $hacker, 1);
118endif
119set_property_info(o, p, info);
120endfor
121endfor
122"----------------------------------------";
123player:notify("Removing all unsaved :recycle and :exitfunc verbs ...");
124for o in [#0..max_object()]
125i = toint(o);
126if (i && ((i % 1000) == 0))
127player:notify(tostr("... ", o));
128endif
129(ticks_left() < 4000) && suspend(0);
130if (valid(o) && (!(o in saved)))
131for v in ({"recycle", "exitfunc"})
132while ($object_utils:defines_verb(o, v))
133delete_verb(o, v);
134endwhile
135endfor
136endif
137endfor
138"----------------------------------------";
139player:notify("Recycling unsaved objects ...");
140add_property(this, "mcd_pos", toint(max_object()), {player, "r"});
141add_property(this, "mcd_save", {saved, saved_props}, {player, "r"});
142suspend(0);
143this:mcd_2(saved, saved_props);

@shutdown

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1if (!player.wizard)
2player:notify("Sorry.");
3return;
4elseif ($code_utils:task_valid($shutdown_task))
5player:notify("Shutdown already in progress.");
6return;
7endif
8if (s = match(argstr, "^in +%([0-9]+%) +"))
9bounds = s[3][1];
10delay = toint(argstr[bounds[1]..bounds[2]]);
11argstr = argstr[s[2] + 1..$];
12else
13delay = 2;
14endif
15if (!$command_utils:yes_or_no(tostr("Do you really want to shut down the server in ", delay, " minutes?")))
16player:notify("Aborted.");
17return;
18endif
19announce_times = {};
20if (delay > 0)
21while (delay > 0)
22announce_times = {@announce_times, delay * 60};
23delay = delay / 2;
24endwhile
25announce_times = {@announce_times, 30, 10};
26$shutdown_time = time() + announce_times[1];
27endif
28$shutdown_message = tostr(player.name, " (", player, "): ", argstr);
29$shutdown_task = task_id();
30for i in [1..length(announce_times)]
31msg = $generic_editor:fill_string(tostr("*** The server will be shut down by ", player.name, " (", player, ") in ", $time_utils:english_time(announce_times[i]), ": ", argstr, " ***"));
32"...use raw notify() since :notify() verb could be broken...";
33for p in (connected_players())
34for line in (msg)
35notify(p, line);
36endfor
37$command_utils:suspend_if_needed(0);
38endfor
39suspend(announce_times[i] - {@announce_times, 0}[i + 1]);
40endfor
41for p in (connected_players())
42notify(p, tostr("*** Server shutdown by ", player.name, " (", player, "): ", argstr, " ***"));
43boot_player(p);
44endfor
45suspend(0);
46$shutdown_task = E_NONE;
47set_task_perms(player);
48shutdown(argstr);

@dump-d*atabase

Spec none none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2dump_database();
3player:notify("Dumping...");

@who-calls

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2if (argstr[1] != ":")
3argstr = ":" + argstr;
4endif
5player:notify(tostr("Searching for verbs that appear to call ", argstr, " ..."));
6player:notify("");
7$code_utils:find_verbs_containing(argstr + "(");

mcd_2

Spec none none noneFlags rxdOwner #2Definer #57

Referenced by

Source

1if (!caller_perms().wizard)
2return;
3elseif (!("mcd_pos" in properties(this)))
4return;
5endif
6end = this.mcd_pos;
7saved = args[1];
8saved_props = args[2];
9protect = $server_options.protect_recycle;
10$server_options.protect_recycle = 0;
11player:notify(tostr("*** Recycling from #", end, " ..."));
12suspend(0);
13fork (0)
14this:mcd_2(saved, saved_props);
15endfork
16for i in [0..end]
17this.mcd_pos = end - i;
18o = toobj(end - i);
19if ($command_utils:running_out_of_time())
20return;
21endif
22if (valid(o) && (!(o in saved)))
23for x in (o.contents)
24move(x, #-1);
25endfor
26if (is_player(o))
27o.features = {};
28set_player_flag(o, 0);
29endif
30`recycle(o) ! E_QUOTA => player:notify(tostr("recycle(", o, ") did not work due to E_QUOTA"))';
31endif
32endfor
33delete_property(this, "mcd_pos");
34"----------------------------------------";
35try
36suspend(0);
37player:notify("Killing queued tasks ...");
38for t in (queued_tasks())
39kill_task(t[1]);
40endfor
41except (ANY)
42"continue";
43endtry
44"----------------------------------------";
45try
46player:notify("Compacting object numbers ...");
47alist = {};
48for p in (saved_props)
49(ticks_left() < 4000) && suspend(0);
50if (pair = $list_utils:assoc(#0.(p), alist))
51#0.(p) = pair[2];
52elseif (#0.(p) != player)
53old = #0.(p);
54#0.(p) = renumber(#0.(p));
55alist = {@alist, {old, #0.(p)}};
56endif
57endfor
58except (ANY)
59"Keep going";
60endtry
61try
62for o in (saved)
63if (valid(o) && (o != player))
64renumber(o);
65endif
66endfor
67reset_max_object();
68except (ANY)
69"Keep going";
70endtry
71"----------------------------------------";
72player:notify("Performing miscellaneous cleanups ...");
73try
74for o in [#0..max_object()]
75(ticks_left() < 4000) && suspend(0);
76try
77move(o, ((o == player) || (o == $news)) ? $player_start | #-1);
78except e (ANY)
79player:notify(tostr("Couldn't move ", o, " => ", e[2]));
80player:notify(toliteral(e[4]));
81endtry
82if ($object_utils:has_callable_verb(o, "init_for_core"))
83try
84o:init_for_core();
85except e (ANY)
86player:notify(tostr("Error from ", o, ":init_for_core => ", e[2]));
87player:notify(toliteral(e[4]));
88endtry
89endif
90endfor
91except (ANY)
92"Keep going";
93endtry
94"---------and finally---------";
95try
96$server_options.protect_recycle = protect;
97$dead_zone = $player_start;
98$reaper = player;
99$default_holder = $hacker;
100$player_class = $rpgamer;
101player:notify("Re-measuring everything ...");
102for o in [#0..max_object()]
103(ticks_left() < 4000) && suspend(0);
104$byte_quota_utils:object_bytes(o);
105endfor
106$wiz_utils:initialize_owned();
107$byte_quota_utils:summarize_one_user(player);
108player:notify("Core database extraction is complete.  Type @shutdown to save it.");
109except (ANY)
110player:notify("There may have been an error in the corifying. Check the objects in this core and run make-core-database again.");
111endtry

@toad @toad! @toad!!

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@toad[!][!] <player> [blacklist|redlist|graylist] [commentary]";
2whostr = args[1];
3comment = $string_utils:first_word(argstr)[2];
4if (verb == "@toad!!")
5listname = "redlist";
6elseif (verb == "@toad!")
7listname = "blacklist";
8elseif ((ln = {@args, ""}[2]) && (index(listname = $login:listname(ln), ln) == 1))
9"...first word of coment is one of the magic words...";
10comment = $string_utils:first_word(comment)[2];
11else
12listname = "";
13endif
14if ((!player.wizard) || (player != this))
15player:notify("Yeah, right... you wish.");
16return;
17elseif ($command_utils:player_match_failed(who = $string_utils:match_player(whostr), whostr))
18return;
19elseif (((whostr != who.name) && (!(whostr in who.aliases))) && (whostr != tostr(who)))
20player:notify(tostr("Must be a full name or an object number:  ", who.name, "(", who, ")"));
21return;
22elseif (who == player)
23player:notify("If you want to toad yourself, you have to do it by hand.");
24return;
25endif
26dobj = who;
27if (msg = player:toad_victim_msg())
28notify(who, msg);
29endif
30if ($wiz_utils:rename_all_instances(who, "disfunc", "toad_disfunc"))
31player:notify(tostr(who, ":disfunc renamed."));
32endif
33if ($wiz_utils:rename_all_instances(who, "recycle", "toad_recycle"))
34player:notify(tostr(who, ":recycle renamed."));
35endif
36"MOO-specific cleanup while still a player object.";
37this:toad_cleanup(who);
38e = $wiz_utils:unset_player(who, $hacker);
39player:notify(e ? tostr(who.name, "(", who, ") is now a toad.") | tostr(e));
40if (e && ($object_utils:isa(who.location, $room) && (msg = player:toad_msg())))
41who.location:announce_all_but({who}, msg);
42endif
43if (listname && (!$login:(listname + "ed")(cname = $string_utils:connection_hostname(who.last_connect_place))))
44$login:(listname + "_add")(cname);
45player:notify(tostr("Site ", cname, " ", listname, "ed."));
46else
47cname = "";
48endif
49if (!comment)
50player:notify("So why is this person being toaded?");
51comment = $command_utils:read();
52endif
53$mail_agent:send_message(player, $toad_log, tostr("@toad ", who.name, " (", who, ")"), {$string_utils:from_list(who.all_connect_places, " "), @cname ? {$string_utils:capitalize(listname + "ed:  ") + cname} | {}, @comment ? {comment} | {}});
54player:notify(tostr("Mail sent to ", $mail_agent:name($toad_log), "."));

@untoad @detoad

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@untoad <object> [as namespec]";
2"Turns object into a player.  Anything that isn't a guest is chowned to itself.";
3if (!player.wizard)
4player:notify("Yeah, right... you wish.");
5elseif (prepstr && (prepstr != "as"))
6player:notify(tostr("Usage:  ", verb, " <object> [as name,alias,alias...]"));
7elseif ($command_utils:object_match_failed(dobj, dobjstr))
8elseif (prepstr && (!(e = $building_utils:set_names(dobj, iobjstr))))
9player:notify(tostr("Initial rename failed:  ", e));
10elseif (e = $wiz_utils:set_player(dobj, g = $object_utils:isa(dobj, $guest)))
11player:notify(tostr(dobj.name, "(", dobj, ") is now a ", g ? "usable guest." | "player."));
12elseif (e == E_INVARG)
13player:notify(tostr(dobj.name, "(", dobj, ") is not of an appropriate player class."));
14player:notify("@chparent it to $player or some descendant.");
15elseif (e == E_NONE)
16player:notify(tostr(dobj.name, "(", dobj, ") is already a player."));
17elseif (e == E_NACC)
18player:notify("Wait until $player_db is finished updating...");
19elseif (e == E_RECMOVE)
20player:notify(tostr("The name `", dobj.name, "' is currently unavailable."));
21player:notify(tostr("Try again with   ", verb, " ", dobj, " as <newname>"));
22else
23player:notify(tostr(e));
24endif

@quota

Spec any is anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@quota <player> is [public] <number> [<reason>]";
2"  changes a player's quota.  sends mail to the wizards.";
3if (player != this)
4return player:notify("Permission denied.");
5endif
6set_task_perms(player);
7dobj = $string_utils:match_player(dobjstr);
8if ($command_utils:player_match_result(dobj, dobjstr)[1])
9return;
10elseif (!valid(dobj))
11player:notify("Set whose quota?");
12return;
13endif
14if (iobjstr[1..min(7, $)] == "public ")
15iobjstr[1..7] = "";
16if ($object_utils:has_property($local, "public_quota_log"))
17recipients = {$quota_log, $local.public_quota_log};
18else
19player:tell("No public quota log.");
20return E_INVARG;
21endif
22else
23recipients = {$quota_log};
24endif
25old = $quota_utils:get_quota(dobj);
26qstr = iobjstr[1..(n = index(iobjstr + " ", " ")) - 1];
27new = $code_utils:toint((qstr[1] == "+") ? qstr[2..$] | qstr);
28reason = iobjstr[n + 1..$] || "(none)";
29if (typeof(new) != INT)
30player:notify(tostr("Set ", dobj.name, "'s quota to what?"));
31return;
32elseif (qstr[1] == "+")
33new = old + new;
34endif
35result = $quota_utils:set_quota(dobj, new);
36if (typeof(result) == ERR)
37player:notify(tostr(result));
38else
39player:notify(tostr(dobj.name, "'s quota set to ", new, "."));
40endif
41$mail_agent:send_message(player, recipients, tostr("@quota ", dobj.name, " (", dobj, ") ", new, " (from ", old, ")"), tostr("Reason for quota ", ((new - old) < 0) ? "decrease: " | "increase: ", reason, index("?.!", reason[$]) ? "" | "."));

@players

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2"The time below is Oct. 1, 1990, roughly the birthdate of the LambdaMOO server.";
3start = 654768000;
4now = time();
5day = (24 * 60) * 60;
6week = 7 * day;
7month = 30 * day;
8days_objects = days_players = {0, 0, 0, 0, 0, 0, 0};
9weeks_objects = weeks_players = {0, 0, 0, 0};
10months_objects = months_players = {};
11nonplayer_objects = invalid_objects = 0;
12always_objects = always_players = 0;
13never_objects = never_players = 0;
14numo = 0;
15if (argstr)
16if (((!dobjstr) && (prepstr == "with")) && (index("objects", iobjstr) == 1))
17with_objects = 1;
18else
19player:notify(tostr("Usage:  ", verb, " [with objects]"));
20return;
21endif
22else
23with_objects = 0;
24players = players();
25endif
26for i in [1..with_objects ? toint(max_object()) + 1 | length(players)]
27if (with_objects)
28o = toobj(i - 1);
29else
30o = players[i];
31endif
32if ($command_utils:running_out_of_time())
33player:notify(tostr("... ", o));
34suspend(0);
35endif
36if (valid(o))
37numo = numo + 1;
38p = is_player(o) ? o | o.owner;
39if (!valid(p))
40invalid_objects = invalid_objects + 1;
41elseif (!$object_utils:isa(p, $player))
42nonplayer_objects = nonplayer_objects + 1;
43else
44seconds = now - p.last_connect_time;
45days = seconds / day;
46weeks = seconds / week;
47months = seconds / month;
48if (seconds < 0)
49if (is_player(o))
50always_players = always_players + 1;
51else
52always_objects = always_objects + 1;
53endif
54elseif (seconds > (now - start))
55if (is_player(o))
56never_players = never_players + 1;
57else
58never_objects = never_objects + 1;
59endif
60elseif (months > 0)
61while (months > length(months_players))
62months_players = {@months_players, 0};
63months_objects = {@months_objects, 0};
64endwhile
65if (is_player(o))
66months_players[months] = months_players[months] + 1;
67endif
68months_objects[months] = months_objects[months] + 1;
69elseif (weeks > 0)
70if (is_player(o))
71weeks_players[weeks] = weeks_players[weeks] + 1;
72endif
73weeks_objects[weeks] = weeks_objects[weeks] + 1;
74else
75if (is_player(o))
76days_players[days + 1] = days_players[days + 1] + 1;
77endif
78days_objects[days + 1] = days_objects[days + 1] + 1;
79endif
80endif
81endif
82endfor
83player:notify("");
84player:notify(tostr("Last connected"));
85player:notify(tostr("at least this     Num.     Cumul.   Cumul. %", with_objects ? "     Num.     Cumul.   Cumul. %" | ""));
86player:notify(tostr("long ago        players   players   players ", with_objects ? "   objects   objects   objects" | ""));
87player:notify(tostr("---------------------------------------------", with_objects ? "--------------------------------" | ""));
88su = $string_utils;
89col1 = 14;
90col2 = 7;
91col3 = 10;
92col4 = 9;
93col5 = 11;
94col6 = 11;
95col7 = 10;
96nump = length(players());
97totalp = totalo = 0;
98for x in ({{days_players, days_objects, "day", 1}, {weeks_players, weeks_objects, "week", 0}, {months_players, months_objects, "month", 0}})
99pcounts = x[1];
100ocounts = x[2];
101unit = x[3];
102offset = x[4];
103for i in [1..length(pcounts)]
104$command_utils:suspend_if_needed(0);
105j = i - offset;
106player:notify(tostr(su:left(tostr(j, " ", unit, (j == 1) ? ":" | "s:"), col1), su:right(pcounts[i], col2), su:right(totalp = totalp + pcounts[i], col3), su:right((totalp * 100) / nump, col4), "%", with_objects ? tostr(su:right(ocounts[i], col5), su:right(totalo = totalo + ocounts[i], col6), su:right((totalo * 100) / numo, col7), "%") | ""));
107endfor
108player:notify("");
109endfor
110player:notify(tostr(su:left("Never:", col1), su:right(never_players, col2), su:right(totalp = totalp + never_players, col3), su:right((totalp * 100) / nump, col4), "%", with_objects ? tostr(su:right(never_objects, col5), su:right(totalo = totalo + never_objects, col6), su:right((totalo * 100) / numo, col7), "%") | ""));
111player:notify(tostr(su:left("Always:", col1), su:right(always_players, col2), su:right(totalp = totalp + always_players, col3), su:right((totalp * 100) / nump, col4), "%", with_objects ? tostr(su:right(always_objects, col5), su:right(totalo = totalo + always_objects, col6), su:right((totalo * 100) / numo, col7), "%") | ""));
112with_objects && player:notify(tostr(su:left("Non-player owner:", (((col1 + col2) + col3) + col4) + 1), su:right(nonplayer_objects, col5), su:right(totalo = totalo + nonplayer_objects, col6), su:right((totalo * 100) / numo, col7), "%"));
113with_objects && player:notify(tostr(su:left("Invalid owner:", (((col1 + col2) + col3) + col4) + 1), su:right(invalid_objects, col5), su:right(totalo = totalo + invalid_objects, col6), su:right((totalo * 100) / numo, col7), "%"));
114player:notify("");

kill_aux_wizard_parse

Spec this none thisFlags rxdOwner #2Definer #57

Referenced by

none

Source

1"Auxiliary verb for parsing @kill soon [#-of-seconds] [player | everyone]";
2"Args[1] is either # of seconds or player/everyone.";
3"Args[2], if it exists, is player/everyone, and forces args[1] to have been # of seconds.";
4"Return value: {# of seconds [default 60] , 1 for all, object for player.}";
5set_task_perms(caller_perms());
6nargs = length(args);
7soon = toint(args[1]);
8if (nargs > 1)
9everyone = args[2];
10elseif (soon <= 0)
11everyone = args[1];
12else
13everyone = 0;
14endif
15if (everyone == "everyone")
16everyone = 1;
17elseif (typeof(everyone) == STR)
18result = $string_utils:match_player(everyone);
19if ($command_utils:player_match_failed(result, everyone))
20player:notify(tostr("Usage:  ", callers()[1][2], " soon [number of seconds] [\"everyone\" | player name]"));
21return {-1, -1};
22else
23return {soon ? soon | 60, result};
24endif
25endif
26return {soon ? soon | 60, everyone ? everyone | player};

@grepcore @egrepcore

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2if (!args)
3player:notify(tostr("Usage:  ", verb, " <pattern>"));
4return;
5endif
6pattern = argstr;
7regexp = verb == "@egrepcore";
8player:notify(tostr("Searching for core verbs ", regexp ? "matching the regular expression " | "containing the string ", toliteral(pattern), " ..."));
9player:notify("");
10$code_utils:(regexp ? "find_verbs_matching" | "find_verbs_containing")(pattern, $core_objects());

@net-who @@who

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@net-who prints all connected users and hosts.";
2"@net-who player player player prints specified users and current or most recent connected host.";
3"@net-who from hoststring prints all players who have connected from that host or host substring.  Substring can include *'s, e.g. @net-who from *.foo.edu.";
4set_task_perms(player);
5su = $string_utils;
6if ((prepstr == "from") && dobjstr)
7player:notify(tostr("Usage:  ", verb, " from <host string>"));
8elseif (((prepstr != "from") || dobjstr) || (!iobjstr))
9"Not parsing 'from' here...  Instead printing connected/recent users.";
10if (!(pstrs = args))
11unsorted = connected_players();
12else
13unsorted = listdelete($command_utils:player_match_result(su:match_player(pstrs), pstrs), 1);
14endif
15if (!unsorted)
16return;
17endif
18$wiz_utils:show_netwho_listing(player, unsorted);
19else
20$wiz_utils:show_netwho_from_listing(player, iobjstr);
21endif

@make-player

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"Creates a player.";
2"Syntax:  @make-player name email-address comments....";
3"Generates a random password for the player.";
4if ((!player.wizard) || callers())
5return E_PERM;
6elseif (!args)
7player:tell("Syntax:  @make-player name email-address comments....");
8return;
9elseif (args[2] == "for")
10"common mistake: @make-player <name> for <email-address> ...";
11args = listdelete(args, 2);
12endif
13return $wiz_utils:do_make_player(@args);

@abort-sh*utdown

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1if (!player.wizard)
2player:notify("Sorry.");
3elseif (!$code_utils:task_valid($shutdown_task))
4player:notify("No server shutdown in progress.");
5$shutdown_task = E_NONE;
6else
7"... Reset time so that $login:check_for_shutdown shuts up...";
8kill_task($shutdown_task);
9$shutdown_task = E_NONE;
10$shutdown_time = time() - 1;
11for p in (connected_players())
12notify(p, tostr("*** Server shutdown ABORTED by ", player.name, " (", player, ")", argstr && (":  " + argstr), " ***"));
13endfor
14endif

toad_msg toad_victim_msg programmer_msg programmer_victim_msg newt_msg newt_victim_msg

Spec this none thisFlags rxdOwner #2Definer #57

Referenced by

Source

1"This is the canonical doing-something-to-somebody message.";
2"The corresponding property can either be";
3"   string             msg for all occasions";
4"   list of 2 strings  {we-are-there-msg,we-are-elsewhere-msg}";
5m = this.(verb);
6if (typeof(m) != LIST)
7return $string_utils:pronoun_sub(m);
8elseif ((this.location == dobj.location) || (length(m) < 2))
9return $string_utils:pronoun_sub(m[1]);
10else
11return $string_utils:pronoun_sub(m[2]);
12endif

moveto

Spec this none thisFlags rxdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms((caller in {this, $generic_editor, $verb_editor, $mail_editor, $note_editor}) ? this.owner | caller_perms());
2return `move(this, args[1]) ! ANY';

@newt

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@newt <player> [commentary]";
2"turns a player into a newt.  It can get better...";
3"adds player to $login.newted, they will not be allowed to log in.";
4"Sends mail to $newt_log giving .all_connect_places and commentary.";
5whostr = args[1];
6comment = $string_utils:first_word(argstr)[2];
7if (!player.wizard)
8player:notify("Yeah, right.");
9elseif ($command_utils:player_match_failed(who = $string_utils:match_player(whostr), whostr))
10return;
11elseif (((whostr != who.name) && (!(whostr in who.aliases))) && (whostr != tostr(who)))
12player:notify(tostr("Must be a full name or an object number:  ", who.name, "(", who, ")"));
13return;
14elseif (who == player)
15player:notify("If you want to newt yourself, you have to do it by hand.");
16return;
17elseif (who in $login.newted)
18player:notify(tostr(who.name, " appears to already be a newt."));
19return;
20else
21$wiz_utils:newt_player(who, comment);
22endif

@unnewt @denewt @get-better

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@denewt <player> [commentary]";
2"Remove the player from $Login.newted";
3"Sends mail to $newt_log with commentary.";
4whostr = args[1];
5comment = $string_utils:first_word(argstr)[2];
6if (!player.wizard)
7player:notify("Yeah, right.");
8elseif ($command_utils:player_match_failed(who = $string_utils:match_player(whostr), whostr))
9return;
10else
11"Should parse email address and register user in some clever way.  Ick.";
12if (!(who in $login.newted))
13player:notify(tostr(who.name, " does not appear to be a newt."));
14else
15$login.newted = setremove($login.newted, who);
16if (entry = $list_utils:assoc(who, $login.temporary_newts))
17$login.temporary_newts = setremove($login.temporary_newts, entry);
18endif
19player:notify(tostr(who.name, " (", who, ") got better."));
20$mail_agent:send_message(player, $newt_log, tostr("@denewt ", who.name, " (", who, ")"), comment ? {comment} | {});
21endif
22endif

@register

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"Registers a player.";
2"Syntax:  @register name email-address [additional commentary]";
3"Email-address is stored in $registration_db and on the player object.";
4if (!player.wizard)
5return player:tell(E_PERM);
6endif
7$wiz_utils:do_register(@args);

@new-password @newpassword

Spec any is anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@newpassword player is [string]";
2"Set's a player's password; omit string to have one randomly generated.";
3"Offer to email the password.";
4if (!player.wizard)
5return E_PERM;
6elseif ($command_utils:player_match_failed(dobj = $string_utils:match_player(dobjstr), dobjstr))
7return;
8elseif (!(dobjstr in {@dobj.aliases, tostr(dobj)}))
9player:notify(tostr("Must be a full name or an object number: ", dobj.name, " (", dobj, ")"));
10else
11$wiz_utils:do_new_password(dobj, iobjstr);
12endif

@log

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@log [<string>]    enters a comment in the server log.";
2"If no string is given, you are prompted to enter one or more lines for an extended comment.";
3set_task_perms(player);
4whostr = tostr("from ", player.name, " (", player, ")");
5if ((!player.wizard) || (player != caller))
6player:notify("Yeah, right.");
7elseif (argstr)
8server_log(tostr("COMMENT: [", whostr, "]  ", argstr));
9player:notify("One-line comment logged.");
10elseif (lines = $command_utils:read_lines())
11server_log(tostr("COMMENT: [", whostr, "]"));
12for l in (lines)
13server_log(l);
14endfor
15server_log(tostr("END_COMMENT."));
16player:notify(tostr(length(lines), " lines logged as extended comment."));
17endif

@guests

Spec any none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2n = (dobjstr == "all") ? 0 | $code_utils:toint(dobjstr || "20");
3if (caller != this)
4player:notify("You lose.");
5elseif ((n == E_TYPE) && (index("now", dobjstr) != 1))
6player:notify(tostr("Usage:  ", verb, " <number>  (where <number> indicates how many entries to look at in the guest log)"));
7player:notify(tostr("Usage:  ", verb, " now (to see information about currently connected guests only)"));
8elseif ((!dobjstr) || (index("now", dobjstr) != 1))
9$guest_log:last(n);
10else
11"*way* too much copied code in here from @who...  Sorry.  --yduJ";
12su = $string_utils;
13conn = connected_players();
14unsorted = {};
15for g in ($object_utils:leaves($guest))
16if (g in conn)
17unsorted = {@unsorted, g};
18endif
19endfor
20if (!unsorted)
21player:tell("No guests found.");
22return;
23endif
24footnotes = {};
25alist = {};
26nwidth = length("Player name");
27for u in (unsorted)
28pref = u.programmer ? "% " | "  ";
29u.programmer && (footnotes = setadd(footnotes, "prog"));
30u3 = {tostr(pref, u.name, " (", u, ")"), su:from_seconds(connected_seconds(u)), su:from_seconds(idle_seconds(u)), where = $string_utils:connection_hostname(connection_name(u))};
31nwidth = max(length(u3[1]), nwidth);
32if ($login:blacklisted(where))
33where = "(*) " + where;
34footnotes = setadd(footnotes, "black");
35elseif ($login:graylisted(where))
36where = "(+) " + where;
37footnotes = setadd(footnotes, "gray");
38endif
39alist = {@alist, u3};
40$command_utils:suspend_if_needed(0);
41endfor
42alist = $list_utils:sort_alist_suspended(0, alist, 3);
43$command_utils:suspend_if_needed(0);
44headers = {"Player name", "Connected", "Idle Time", "From Where"};
45time_width = length("59 minutes") + 2;
46before = {0, w1 = nwidth + 3, w2 = w1 + time_width, w3 = w2 + time_width};
47tell1 = "  " + headers[1];
48tell2 = "  " + su:space(headers[1], "-");
49for j in [2..4]
50tell1 = su:left(tell1, before[j]) + headers[j];
51tell2 = su:left(tell2, before[j]) + su:space(headers[j], "-");
52endfor
53player:notify(tell1);
54player:notify(tell2);
55active = 0;
56for a in (alist)
57$command_utils:suspend_if_needed(0);
58tell1 = a[1];
59for j in [2..4]
60tell1 = su:left(tell1, before[j]) + tostr(a[j]);
61endfor
62player:notify(tell1[1..min($, 79)]);
63endfor
64if (footnotes)
65player:notify("");
66if ("prog" in footnotes)
67player:notify(" %  == programmer.");
68endif
69if ("black" in footnotes)
70player:notify("(*) == blacklisted site.");
71endif
72if ("gray" in footnotes)
73player:notify("(+) == graylisted site.");
74endif
75endif
76player:tell("@guests display complete.");
77endif

@rn mail_catch_up check_mail_lists current_message set_current_message get_current_message make_current_message kill_current_message @nn

Spec none none noneFlags rxdOwner #2Definer #57

Referenced by

none

Source

1if (caller != this)
2set_task_perms(valid(caller_perms()) ? caller_perms() | player);
3endif
4use = this.mail_identity;
5if (valid(use) && (use != this))
6return use:(verb)(@args);
7else
8return pass(@args);
9endif

@blacklist @graylist @redlist @unblacklist @ungraylist @unredlist @spooflist @unspooflist

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@[un]blacklist [<site or subnet>  [for <duration>] [commentary]]";
2"@[un]graylist  [<site or subnet>  [for <duration>] [commentary]]";
3"@[un]redlist   [<site or subnet>  [for <duration>] [commentary]]";
4"@[un]spooflist [<site of subnet>  [for <duration>] [commentary]]";
5"The `for <duration>' is for temporary colorlisting a site only. The duration should be in english time units:  for 1 hour, for 1 day 2 hours 15 minutes, etc. The commentary should be after all durations. Note, if you are -not- using a duration, do not start your commentary with the word `for'.";
6set_task_perms(player);
7if ((player != this) || (!player.wizard))
8player:notify("Ummm.  no.");
9return;
10endif
11undo = verb[2..3] == "un";
12which = $login:listname(verb[undo ? 4 | 2]);
13downgrade = {"", "graylist", "blacklist"}[1 + index("br", which[1])];
14if (!(fw = $string_utils:first_word(argstr)))
15"... Just print the list...";
16this:display_list(which);
17return;
18endif
19target = fw[1];
20if (fw[2] && (parse = this:parse_templist_duration(fw[2]))[1])
21if ((typeof(parse[3]) == ERR) || (!parse[3]))
22player:notify(tostr("Could not parse the duration for @", which, "ing site \"", target, "\""));
23return;
24endif
25start = parse[2];
26duration = parse[3];
27comment = parse[4] ? {parse[4]} | {};
28comment = {tostr("for ", $time_utils:english_time(duration)), @comment};
29elseif (fw[2])
30comment = fw[2];
31else
32"Get the right vars set up as though parse had been called";
33parse = {0, ""};
34comment = {};
35endif
36if (is_literal = $site_db:domain_literal(target))
37if (target[$] == ".")
38target = target[1..$ - 1];
39endif
40fullname = "subnet " + target;
41else
42if (target[1] == ".")
43target[1..1] = "";
44endif
45fullname = ("domain `" + target) + "'";
46endif
47entrylist = $login.(which)[1 + (!is_literal)];
48if ((!undo) && (target in entrylist))
49player:notify(tostr(fullname, " is already ", which, "ed."));
50return;
51endif
52entrylist = setremove(entrylist, target);
53if (!(result = this:check_site_entries(undo, which, target, is_literal, entrylist))[1])
54return;
55endif
56rm = result[2];
57namelist = $string_utils:english_list(rm);
58downgraded = {};
59if (rm)
60ntries = (length(rm) == 1) ? "ntry" | "ntries";
61if ($command_utils:yes_or_no(tostr("Remove e", ntries, " for ", namelist, "?")))
62dg = undo && (downgrade && $command_utils:yes_or_no(downgrade + " them?"));
63for s in (rm)
64$login:(which + "_remove")(s);
65dg && ($login:(downgrade + "_add")(s) && (downgraded = {@downgraded, s}));
66endfor
67player:notify(tostr("E", ntries, " removed", @dg ? {" and ", downgrade, "ed."} | {"."}));
68else
69player:notify(tostr(namelist, " will continue to be ", which, "ed."));
70rm = {};
71endif
72endif
73if (downgraded)
74comment[1..0] = {tostr(downgrade, "ed ", $string_utils:english_list(downgraded), ".")};
75endif
76tempentrylist = $login.("temporary_" + which)[1 + (!is_literal)];
77if ((!undo) && (target in $list_utils:slice(tempentrylist)))
78player:notify(tostr(fullname, " is already temporarily ", which, "ed."));
79return;
80endif
81if (en = $list_utils:assoc(target, tempentrylist))
82tempentrylist = setremove(tempentrylist, en);
83endif
84if (!(result = this:check_site_entries(undo, which, target, is_literal, $list_utils:slice(tempentrylist)))[1])
85return;
86endif
87rmtemp = result[2];
88tempnamelist = $string_utils:english_list(rmtemp);
89tempdowngraded = {};
90if (rmtemp)
91ntries = (length(rmtemp) == 1) ? "ntry" | "ntries";
92if ($command_utils:yes_or_no(tostr("Remove e", ntries, " for ", tempnamelist, "?")))
93dg = undo && (downgrade && $command_utils:yes_or_no(downgrade + " them?"));
94for s in (rmtemp)
95old = $list_utils:assoc(s, tempentrylist);
96$login:(which + "_remove_temp")(s);
97dg && ($login:(downgrade + "_add_temp")(s, old[2], old[3]) && (tempdowngraded = {@tempdowngraded, s}));
98endfor
99player:notify(tostr("E", ntries, " removed", @dg ? {" and ", downgrade, "ed with durations transferred."} | {"."}));
100else
101player:notify(tostr(tempnamelist, " will continue to be temporarily ", which, "ed."));
102rmtemp = {};
103endif
104endif
105if (tempdowngraded)
106comment[1..0] = {tostr(downgrade, "ed ", $string_utils:english_list(tempdowngraded), ".")};
107endif
108if (!undo)
109if (parse[1])
110$login:(which + "_add_temp")(target, start, duration);
111player:notify(tostr(fullname, " ", which, "ed for ", $time_utils:english_time(duration)));
112else
113$login:(which + "_add")(target);
114player:notify(tostr(fullname, " ", which, "ed."));
115endif
116if (rm)
117comment[1..0] = {tostr("Subsumes ", which, "ing for ", namelist, ".")};
118endif
119if (rmtemp)
120comment[1..0] = {tostr("Subsumes temporary ", which, "ing for ", tempnamelist, ".")};
121endif
122elseif ($login:(which + "_remove")(target))
123player:notify(tostr(fullname, " un", which, "ed."));
124if (!downgrade)
125elseif ($command_utils:yes_or_no(downgrade + " it?"))
126$login:(downgrade + "_add")(target) && (downgraded = {target, @downgraded});
127player:notify(tostr(fullname, " ", downgrade, "ed."));
128else
129player:notify(tostr(fullname, " not ", downgrade, "ed."));
130endif
131if (downgraded)
132comment[1..0] = {tostr(downgrade, "ed ", $string_utils:english_list(downgraded), ".")};
133endif
134if (rm)
135comment[1..0] = {tostr("Also removed ", namelist, ".")};
136endif
137elseif ((old = $list_utils:assoc(target, $login.("temporary_" + which)[1 + (!is_literal)])) && $login:(which + "_remove_temp")(target))
138player:notify(tostr(fullname, " un", which, "ed."));
139if (!downgrade)
140elseif ($command_utils:yes_or_no(downgrade + " it?"))
141$login:(downgrade + "_add_temp")(target, old[2], old[3]) && (tempdowngraded = {target, @tempdowngraded});
142player:notify(tostr(fullname, " ", downgrade, "ed, currently for ", $time_utils:english_time(old[3]), " from ", $time_utils:time_sub("$1/$3", old[2])));
143else
144player:notify(tostr(fullname, " not ", downgrade, "ed."));
145endif
146if (tempdowngraded)
147comment[1..0] = {tostr(downgrade, "ed ", $string_utils:english_list(tempdowngraded), "with durations transferred.")};
148endif
149if (rmtemp)
150comment[1..0] = {tostr("Also removed ", tempnamelist, ".")};
151endif
152elseif (rm || rmtemp)
153player:notify(tostr(fullname, " itself was never actually ", which, "ed."));
154comment[1..0] = {tostr("Removed ", namelist, " from regular and ", tempnamelist, " from temporary.")};
155else
156player:notify(tostr(fullname, " was not ", which, "ed before."));
157return;
158endif
159subject = tostr(undo ? "@un" | "@", which, " ", fullname);
160$mail_agent:send_message(player, $site_log, subject, comment);
161"...";
162"... make sure we haven't screwed ourselves...";
163uhoh = {};
164for site in (player.all_connect_places)
165if (index(site, target) && $login:(which + "ed")(site))
166uhoh = {@uhoh, site};
167endif
168endfor
169if (uhoh)
170player:notify(tostr("WARNING:  ", $string_utils:english_list(uhoh), " are now ", which, "ed!"));
171endif

@corify

Spec any as anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"Usage:  @corify <object> as <propname>";
2"Adds <object> to the core, as $<propname>";
3"Reminds the wizard to write an :init_for_core verb, if there isn't one already.";
4if (!player.wizard)
5player:tell("Sorry, the core is wizardly territory.");
6return;
7endif
8if (dobj == $failed_match)
9dobj = player:my_match_object(dobjstr);
10endif
11if ($command_utils:object_match_failed(dobj, dobjstr))
12return;
13endif
14if (!iobjstr)
15player:tell("Usage:  @corify <object> as <propname>");
16return;
17elseif (iobjstr[1] == "$")
18iobjstr = iobjstr[2..$];
19endif
20try
21add_property(#0, iobjstr, dobj, {player, "r"});
22except e (ANY)
23return player:tell(e[1], ":", e[2]);
24endtry
25if (!("init_for_core" in verbs(dobj)))
26player:tell(dobj:titlec(), " has no :init_for_core verb.  Strongly consider adding one before doing anything else.");
27if ($command_utils:yes_or_no("Would you like the MOO to automatically  create an :init_for_core verb using the object's present settings?"))
28$wiz_utils:make_init_verb(dobj, iobjstr);
29endif
30else
31player:tell("Corified ", $string_utils:nn(dobj), " as $", iobjstr, ".");
32endif

@make-guest

Spec any none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1"Usage:  @make-guest <guestname>";
2"Creates a player called <guestname>_Guest owned by $hacker and a child of $guest. Or, if $local.guest exists, make a child of that, assuming that all other guests are children of it too.";
3if (!player.wizard)
4player:tell("If you think this MOO needs more guests, you should contact a wizard.");
5return E_PERM;
6endif
7if (length(args) != 1)
8player:tell("Usage: ", verb, " <guest name>");
9return;
10endif
11guest_parent = (($object_utils:has_property($local, "guest") && valid($local.guest)) && $object_utils:isa($local.guest, $guest)) ? $local.guest | $guest;
12i = length(children(guest_parent));
13while (!$player_db:available(guestnum = tostr("Guest", i = i + 1)))
14endwhile
15guestname = args[1] + "_Guest";
16guestaliases = {guestname, adj = args[1], guestnum};
17if (!player.wizard)
18return;
19elseif ($player_db.frozen)
20player:tell("Sorry, the player db is frozen, so no players can be made right now.  Please try again in a few minutes.");
21return;
22elseif (!$player_db:available(guestname))
23player:tell("\"", guestname, "\" is not an available name.");
24return;
25elseif (!$player_db:available(adj))
26player:Tell("\"", adj, "\" is not an available name.");
27return;
28else
29new = $quota_utils:bi_create(guest_parent, $hacker);
30new:set_name(guestname);
31new:set_aliases(guestaliases);
32if (!(e = $wiz_utils:set_player(new, 1)))
33player:Tell("Unable to make ", new.name, " (", new, ") a player.");
34player:Tell(tostr(e));
35else
36player:Tell("Guest: ", new.name, " (", new, ") made.");
37new.default_description = {"By definition, guests appear nondescript."};
38new.description = new.default_description;
39new.last_connect_time = $maxint;
40new.last_disconnect_time = time();
41new.password = 0;
42new.size_quota = new.size_quota;
43new:set_gender(new.default_gender);
44move(new, $player_start);
45player:tell("Now don't forget to @describe ", new, " as something.");
46endif
47endif

@temp-newt

Spec any for/about anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1if (!player.wizard)
2return player:tell("Permission denied.");
3elseif (!valid(who = $string_utils:match_player(dobjstr)))
4return $command_utils:player_match_failed(who, dobjstr);
5elseif (((dobjstr != who.name) && (!(dobjstr in who.aliases))) && (dobjstr != tostr(who)))
6return player:tell(tostr("Must be a full name or an object number:  ", who.name, "(", who, ")"));
7elseif (who == player)
8player:notify("If you want to newt yourself, you have to do it by hand.");
9return;
10elseif (!(howlong = $time_utils:parse_english_time_interval(iobjstr)))
11return player:tell("Can't parse time: ", howlong);
12else
13if (who in $login.newted)
14player:notify(tostr(who.name, " appears to already be a newt."));
15else
16$wiz_utils:newt_player(who, "", ("For " + iobjstr) + ".  ");
17endif
18if (index = $list_utils:iassoc(who, $login.temporary_newts))
19$login.temporary_newts[index][2] = time();
20$login.temporary_newts[index][3] = howlong;
21else
22$login.temporary_newts = {@$login.temporary_newts, {who, time(), howlong}};
23endif
24player:tell(who.name, " (", who, ") will be a newt until ", ctime(time() + howlong));
25endif

@deprog*rammer

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"@deprogrammer victim [for <duration>] [reason]";
2"";
3"Removes the prog-bit from victim.  If a duration is specified (see help $time_utils:parse_english_time_interval), then the victim is put into the temporary list. He will be automatically removed the first time he asks for a progbit after the duration expires.  Either with or without the duration you can specify a reason, or you will be prompted for one. However, if you don't have a duration, don't start the reason with the word `For'.";
4set_task_perms(player);
5if ((player != this) || (!player.wizard))
6player:notify("No go.");
7return;
8endif
9if (!args)
10player:notify(tostr("Usage:  ", verb, " <playername> [for <duration>] [reason]"));
11endif
12fw = $string_utils:first_word(argstr);
13if (fw[2] && (parse = this:parse_templist_duration(fw[2]))[1])
14if ((typeof(parse[3]) == ERR) || (!parse[3]))
15player:notify(tostr("Could not parse the duration for restricting programming for ", fw[1], "."));
16return;
17endif
18start = parse[2];
19duration = parse[3];
20reason = parse[4] ? {parse[4]} | {};
21reason = {tostr("for ", $time_utils:english_time(duration)), @reason};
22else
23start = duration = 0;
24reason = fw[2] ? {fw[2]} | {};
25endif
26if ($command_utils:player_match_failed(victim = $string_utils:match_player(fw[1]), fw[1]))
27"...done...";
28elseif (result = $wiz_utils:unset_programmer(victim, reason || $command_utils:read("reason for resetting programmer flag"), @start ? {start, duration} | {}))
29player:notify(tostr(victim.name, " (", victim, ") is no longer a programmer."));
30elseif (result == E_NONE)
31player:notify(tostr(victim.name, " (", victim, ") was already a nonprogrammer..."));
32else
33player:notify(tostr(result));
34endif

display_list

Spec this none thisFlags rxdOwner #2Definer #57

Referenced by

Source

1if ((caller != this) && (!caller_perms().wizard))
2return E_PERM;
3endif
4which = args[1];
5slist = {};
6if (s = $login.(which)[1])
7slist = {@slist, "--- Subnets ---", @s};
8endif
9if (s = $login.(which)[2])
10slist = {@slist, "--- Domains ---", @s};
11endif
12if (s = $login.("temporary_" + which)[1])
13slist = {@slist, "--- Temporary Subnets ---"};
14for d in (s)
15slist = {@slist, tostr(d[1], " until ", $time_utils:time_sub("$1/$3 $H:$M", d[2] + d[3]))};
16$command_utils:suspend_if_needed(2);
17endfor
18endif
19if (s = $login.("temporary_" + which)[2])
20slist = {@slist, "--- Temporary Domains ---"};
21for d in (s)
22slist = {@slist, tostr(d[1], " until ", $time_utils:time_sub("$1/$3 $H:$M", d[2] + d[3]))};
23$command_utils:suspend_if_needed(2);
24endfor
25endif
26if (slist)
27player:notify_lines($string_utils:columnize(slist, 2));
28else
29player:notify(tostr("The ", which, " is empty."));
30endif

parse_templist_duration

Spec this none thisFlags rxdOwner #36Definer #57

Referenced by

Source

1"parses out the time interval at the beginning of the args[1], assumes rest is commentary.";
2if ((fw = $string_utils:first_word(args[1]))[1] == "for")
3words = $string_utils:words(fw[2]);
4try_ = {};
5ind = cont = 1;
6while (cont)
7word = words[ind];
8cont = ind;
9if (toint(word))
10try_ = {@try_, word};
11ind = ind + 1;
12else
13for set in ($time_utils.time_units)
14if (word in set)
15try_ = {@try_, word};
16ind = ind + 1;
17endif
18endfor
19endif
20if ((cont == ind) || (ind > length(words)))
21cont = 0;
22endif
23endwhile
24dur = $time_utils:parse_english_time_interval(@try_);
25rest = $string_utils:from_list(words[ind..$], " ");
26return {1, time(), dur, rest};
27else
28return {0, argstr};
29endif

check_site_entries

Spec this none thisFlags rxdOwner #2Definer #57

Referenced by

Source

1"Called by @[un]<color>list to check existence of the target site.";
2"=> {done okay, LIST of sites to remove}";
3if (caller != this)
4return E_PERM;
5endif
6{undo, which, target, is_literal, entrylist} = args;
7rm = {};
8confirm = 0;
9if (is_literal)
10for s in (entrylist)
11if ((i = index(s, target + ".")) == 1)
12"... target is a prefix of s, s should probably go...";
13rm = {@rm, s};
14elseif (index(target + ".", s + ".") != 1)
15"... s is not a prefix of target...";
16elseif (undo)
17player:notify(tostr("You will need to un", which, " subnet ", s, " as well."));
18elseif (confirm)
19player:notify(tostr("...Subnet ", s, " already ", which, "ed..."));
20else
21player:notify(tostr("Subnet ", s, " already ", which, "ed."));
22if (!(confirm = $command_utils:yes_or_no(tostr(which, " ", target, " anyway?"))))
23return {0, {}};
24endif
25endif
26endfor
27else
28for s in (entrylist)
29if ((i = rindex(s, "." + target)) && (i == (length(s) - length(target))))
30"... target is a suffix of s, s should probably go...";
31rm = {@rm, s};
32elseif ((!(i = rindex("." + target, "." + s))) || (i < ((length(target) - length(s)) + 1)))
33"... s is not a suffix of target...";
34elseif (undo)
35player:notify(tostr("You will need to un", which, " domain `", s, "' as well."));
36elseif (confirm)
37player:notify(tostr("...Domain `", s, "' already ", which, "ed..."));
38else
39player:notify(tostr("Domain `", s, "' already ", which, "ed."));
40if (!(confirm = $command_utils:yes_or_no(tostr(which, " ", target, " anyway?"))))
41return {0, {}};
42endif
43endif
44endfor
45endif
46return {1, rm};

@lock-login @unlock-login @lock-login!

Spec any any anyFlags rdOwner #2Definer #57

Referenced by

none

Source

1"Syntax:  @lock-login <message>";
2"         @lock-login! <message>";
3"         @unlock-login";
4"";
5"The @lock-login calls prevent all non-wizard users from logging in, displaying <message> to them when they try.  (The second syntax, with @lock-login!, additionally boots any nonwizards who are already connected.)  @unlock-login turns this off.";
6if (caller != this)
7raise(E_PERM);
8elseif (verb[2] == "u")
9$no_connect_message = 0;
10player:notify("Login restrictions removed.");
11elseif (!argstr)
12player:notify("You must provide some message to display to users who attempt to login:  @lock-login <message>");
13else
14$no_connect_message = argstr;
15player:notify(tostr("Logins are now blocked for non-wizard players.  Message displayed when attempted:  ", $no_connect_message));
16if (verb == "@lock-login!")
17wizards = $wiz_utils:all_wizards_unadvertised();
18for x in (connected_players())
19if (!(x in wizards))
20boot_player(x);
21endif
22endfor
23player:notify("All nonwizards have been booted.");
24endif
25endif

toad_cleanup

Spec this none thisFlags rxdOwner #2Definer #57

Referenced by

Source

1if ((!player.wizard) || (caller != this))
2raise(E_PERM);
3endif
4"Noop. Placeholder verb for MOO-specific cleanups.";
5"Can be tied into $reaper_feature later.";

@summon

Spec any none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1set_task_perms(player);
2if (player.wizard)
3dobj = $string_utils:match_player(dobjstr);
4if (!valid(dobj))
5player:Tell("I could find no one with that name.");
6return;
7else
8if (`player.x_loc ! E_PROPNF => 0' && `dobj.x_loc ! E_PROPNF => 0')
9$terrain:set_object_loc(dobj, player.x_loc, player.y_loc);
10endif
11if (dobj.location == player.location)
12player:tell(dobj:title(), " is already here.");
13return;
14endif
15dobj:tell("You have been summoned by ", player:title(), ".");
16player:tell("You summon ", dobj:title(), ".");
17player.location:announce(player:titlec(), " casts a spell to summon ", dobj:title(), ".");
18dobj.location:announce_all_but({dobj}, tostr(dobj:titlec(), " has been summoned away!"));
19move(dobj, player.location);
20endif
21else
22player:tell("Sorry, only wizards may do this.");
23endif

@fullprops

Spec any none noneFlags rdOwner #2Definer #57

Referenced by

none

Source

1"Usage:  @fullprops <object> => returns a spammy list of properties,";
2"permissions and ownerships going all the way back to the $root_class.";
3"Some of the @chmod and @chown statements returned may not be necessary,";
4"since ownership and permissions are implied in the creation statements.";
5"The redundant statements are given for clarity.";
6if (player.wizard)
7if (!dobjstr)
8return this:tell("Usage:  @fullprops <object>");
9endif
10dobj = valid(dobj) ? dobj | $string_utils:literal_object(dobjstr);
11for p in (properties(dobj))
12this:tell("");
13suspend(0);
14{owner, perms} = property_info(dobj, p);
15permlist = $string_utils:char_list(perms);
16r = ("r" in permlist) ? 1 | 0;
17c = ("c" in permlist) ? 1 | 0;
18this:tell("@prop ", dobj, ".", p, " ", toliteral(dobj.(p)), " ", perms);
19alt = (!r) ? "!r" | "";
20alt = (!c) ? alt + "!c" | alt;
21if (alt)
22this:tell("@chmod ", dobj, ".", p, " ", alt);
23endif
24this:tell("@chown ", dobj, ".", p, " to ", tostr(owner));
25endfor
26this:tell("");
27mom = parent(dobj);
28while (valid(mom))
29(ticks_left() < 1000) && suspend(0);
30momprops = `properties(mom) ! E_PERM => {}';
31for mp in (momprops)
32suspend(0);
33{owner, perms} = property_info(dobj, mp);
34{mowner, mperms} = property_info(mom, mp);
35permlist = `$string_utils:char_list(mperms) ! ANY => player:notify(tostr(permlist, " on ", mom, ".", mp))';
36r = ("r" in permlist) ? 1 | 0;
37c = ("c" in permlist) ? 1 | 0;
38this:tell("@prop ", mom, ".", mp, " ", toliteral(mom.(mp)), " ", mperms, " ", tostr(mowner));
39alt = (!r) ? "!r" | "";
40alt = (!c) ? alt + "!c" | alt;
41if (alt)
42this:tell("@chmod ", mom, ".", mp, " ", alt);
43endif
44this:tell("@chown ", dobj, ".", mp, " to ", tostr(owner));
45if (mperms != perms)
46this:tell("@chmod ", dobj, ".", mp, " ", perms);
47endif
48if (`dobj.(mp) != mom.(mp) ! ANY => 0')
49this:tell("@set ", dobj, ".", mp, " to ", toliteral(dobj.(mp)));
50endif
51endfor
52mom = parent(mom);
53endwhile
54else
55player:tell("Permission denied.");
56endif