generic wizard #49
Aliases: player
48 verbs · 212 properties · 1 children
Verbs
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
newt_victim_msg | #49 | rc | #361 | "" |
newt_msg | #49 | rc | #361 | "%n @newts %d (%[#d])" |
public_identity | #49 | rc | #361 | #-1 |
programmer_msg | #49 | rc | #361 | "%d is now a programmer." |
programmer_victim_msg | #49 | rc | #361 | "You are now a programmer." |
toad_victim_msg | #49 | rc | #361 | "Have a nice life..." |
toad_msg | #49 | rc | #361 | "%n @toads %d (%[#d])" |
mail_identity | #49 | c | #361 | #-1 |
advertised | #49 | rc | #361 | 1 |
eval_subs | #50 | r | #29 | <clear> |
eval_ticks | #50 | r | #29 | <clear> |
prog_options | #50 | rc | #361 | <clear> |
event_debug_filter | #50 | rc | #361 | <clear> |
progkill_msg | #50 | rc | #361 | <clear> |
progburn_msg | #50 | rc | #361 | <clear> |
proglight_msg | #50 | rc | #361 | <clear> |
heal_msg | #50 | rc | #361 | <clear> |
heal_self_msg | #50 | rc | #361 | <clear> |
revert_form_msg | #50 | rc | #361 | <clear> |
eval_env | #50 | rc | #361 | <clear> |
build_options | #2 | rc | #361 | <clear> |
who_visible | #2 | rc | #361 | <clear> |
join_msg | #89 | rc | #361 | <clear> |
object_port_msg | #89 | rc | #361 | <clear> |
victim_port_msg | #89 | rc | #361 | <clear> |
thing_arrive_msg | #89 | rc | #361 | <clear> |
othing_port_msg | #89 | rc | #361 | <clear> |
thing_port_msg | #89 | rc | #361 | <clear> |
player_arrive_msg | #89 | rc | #361 | <clear> |
oplayer_port_msg | #89 | rc | #361 | <clear> |
player_port_msg | #89 | rc | #361 | <clear> |
self_arrive_msg | #89 | rc | #361 | <clear> |
oself_port_msg | #89 | rc | #361 | <clear> |
self_port_msg | #89 | rc | #361 | <clear> |
real_name | #89 | rc | #361 | <clear> |
real_aliases | #89 | rc | #361 | <clear> |
zots | #89 | rc | #361 | <clear> |
bedroom | #89 | rc | #361 | <clear> |
chillmin | #89 | rc | #361 | <clear> |
_mail_task | #33 | rc | #361 | <clear> |
messages_going | #33 | c | #361 | <clear> |
mail_lists | #33 | rc | #361 | <clear> |
mail_notify | #33 | rc | #361 | <clear> |
mail_forward | #33 | rc | #361 | <clear> |
mail_options | #33 | rc | #361 | {} |
message_keep_date | #33 | rc | #361 | <clear> |
messages_kept | #33 | rc | #361 | <clear> |
current_message | #33 | c | #361 | <clear> |
messages | #33 | c | #361 | <clear> |
mail_hack | #33 | rc | #361 | <clear> |
barcolor | #33 | rc | #361 | <clear> |
autowield | #33 | rc | #361 | <clear> |
bug | #33 | rc | #361 | <clear> |
readied_weapon | #33 | rc | #361 | <clear> |
unread_mail | #33 | rc | #361 | <clear> |
features | #6 | r | #29 | {#84, #170, #113, #149, #317, #310} |
previous_connection | #6 | | #361 | <clear> |
email_address | #6 | | #361 | <clear> |
last_disconnect_time | #6 | r | #361 | <clear> |
help | #6 | rc | #361 | #23 |
more_msg | #6 | rc | #361 | <clear> |
linetask | #6 | r | #29 | <clear> |
linesleft | #6 | r | #29 | <clear> |
linebuffer | #6 | | #29 | <clear> |
pagelen | #6 | r | #29 | <clear> |
owned_objects | #6 | r | #361 | <clear> |
linelen | #6 | r | #29 | <clear> |
current_folder | #6 | c | #361 | <clear> |
all_connect_places | #6 | | #361 | <clear> |
last_connect_place | #6 | | #361 | <clear> |
lines | #6 | c | #361 | <clear> |
page_absent_msg | #6 | rc | #361 | <clear> |
page_origin_msg | #6 | rc | #361 | <clear> |
page_echo_msg | #6 | rc | #361 | <clear> |
edit_options | #6 | rc | #361 | <clear> |
last_connect_time | #6 | r | #361 | <clear> |
ownership_quota | #6 | | #29 | <clear> |
password | #6 | | #361 | "really impossible password to type" |
paranoid | #6 | rc | #361 | <clear> |
display_options | #6 | rc | #361 | <clear> |
verb_subs | #6 | rc | #361 | <clear> |
first_connect_time | #6 | r | #361 | <clear> |
size_quota | #6 | | #29 | <clear> |
last_password_time | #6 | | #361 | <clear> |
last_connect_attempt | #6 | | #361 | <clear> |
prefs | #6 | rc | #361 | <clear> |
ansi | #6 | rc | #361 | <clear> |
last_hit_meter | #6 | rc | #361 | "~1b[1m~1b[37m[~1b[32m|||||||||||||||||||||||||||||~1b[32m*~1b[37m~1b[1m]~1b[0m" |
doing_msg | #6 | rc | #361 | <clear> |
xp_total | #6 | rc | #361 | <clear> |
party | #6 | rc | #361 | <clear> |
rooms | #6 | r | #361 | <clear> |
client | #6 | rc | #361 | <clear> |
last_death_time | #6 | rc | #361 | <clear> |
default_weapon | #6 | rc | #361 | <clear> |
thirst | #6 | rc | #361 | <clear> |
may_chat | #6 | rc | #361 | <clear> |
idlemsg | #6 | rc | #361 | <clear> |
eula | #6 | rc | #361 | <clear> |
birthdate | #6 | rc | #361 | <clear> |
bad_words | #6 | rc | #361 | <clear> |
char_start_time | #6 | rc | #361 | <clear> |
rumors | #6 | rc | #361 | <clear> |
last_broadcast | #6 | rc | #361 | <clear> |
ansihack | #6 | rc | #361 | <clear> |
last_death_callers | #6 | rc | #361 | <clear> |
char_extra_epochs | #6 | rc | #361 | <clear> |
code_name | #6 | rc | #361 | <clear> |
code_plural | #6 | rc | #361 | <clear> |
changeable_properties | #6 | rc | #361 | <clear> |
out_of_band_session | #6 | r | #29 | <clear> |
private_aliases | #6 | rc | #361 | <clear> |
quests_open | #6 | rc | #361 | <clear> |
quests | #6 | rc | #361 | <clear> |
page_receive_msg | #6 | rc | #361 | <clear> |
page_msg | #6 | rc | #361 | <clear> |
focus_skills | #6 | rc | #361 | <clear> |
skillpoints | #100 | rc | #361 | <clear> |
xp | #100 | rc | #361 | <clear> |
mutations | #100 | rc | #361 | <clear> |
mutation_slots | #100 | rc | #361 | <clear> |
char_start_age | #100 | rc | #361 | <clear> |
char_extra_age | #100 | rc | #361 | <clear> |
hands | #107 | rc | #361 | <clear> |
wielding | #107 | rc | #361 | <clear> |
health | #107 | rc | #361 | 500 |
unarmed_weapon | #107 | rc | #361 | <clear> |
size | #107 | rc | #361 | <clear> |
posture | #107 | rc | #361 | "standing" |
gender | #107 | rc | #361 | <clear> |
respawn | #107 | rc | #361 | <clear> |
corpse | #107 | rc | #361 | <clear> |
has_proper_name | #107 | rc | #361 | <clear> |
die_msg | #107 | rc | #361 | <clear> |
body_parts | #107 | rc | #361 | <clear> |
wearing | #107 | rc | #361 | <clear> |
armor | #107 | rc | #361 | <clear> |
last_swing_message | #107 | rc | #361 | <clear> |
health_max | #107 | rc | #361 | <clear> |
fighting | #107 | rc | #361 | {} |
last_dodge_time | #107 | rc | #361 | <clear> |
following | #107 | rc | #361 | <clear> |
icon | #107 | rc | #361 | <clear> |
say_msg | #107 | rc | #361 | <clear> |
say_to_msg | #107 | rc | #361 | <clear> |
afterlife | #107 | rc | #361 | <clear> |
get_msg | #107 | rc | #361 | <clear> |
drop_msg | #107 | rc | #361 | <clear> |
blood | #107 | rc | #361 | {} |
squeals | #107 | rc | #361 | <clear> |
prc | #107 | rc | #361 | <clear> |
ppc | #107 | rc | #361 | <clear> |
poc | #107 | rc | #361 | <clear> |
psc | #107 | rc | #361 | <clear> |
pr | #107 | rc | #361 | <clear> |
pp | #107 | rc | #361 | <clear> |
po | #107 | rc | #361 | <clear> |
ps | #107 | rc | #361 | <clear> |
pq | #107 | rc | #361 | <clear> |
pqc | #107 | rc | #361 | <clear> |
brief | #107 | rc | #361 | <clear> |
knockout | #107 | rc | #361 | <clear> |
knockout_msg | #107 | rc | #361 | <clear> |
body | #107 | rc | #361 | <clear> |
wake_msg | #107 | rc | #361 | <clear> |
owake_msg | #107 | rc | #361 | <clear> |
oknockout_msg | #107 | rc | #361 | <clear> |
friends | #107 | rc | #361 | <clear> |
home | #107 | rc | #361 | <clear> |
respawn_msg | #107 | rc | #361 | <clear> |
move_action | #107 | rc | #361 | <clear> |
heart | #107 | rc | #361 | 0 |
last_heartbeat | #107 | rc | #361 | 1189897907 |
dead | #107 | rc | #361 | <clear> |
_tohit_next | #107 | rc | #361 | <clear> |
last_words_msg | #107 | rc | #361 | <clear> |
attacked | #107 | rc | #361 | <clear> |
opens_doors | #107 | rc | #361 | <clear> |
movable_by_explosion | #107 | rc | #361 | <clear> |
obscured | #107 | rc | #361 | <clear> |
obscured_desc_msg | #107 | rc | #361 | <clear> |
cooldowns | #107 | rc | #361 | <clear> |
combat_rounds | #107 | rc | #361 | <clear> |
encumbrance | #107 | rc | #361 | <clear> |
respawn_handler | #107 | rc | #361 | <clear> |
distant_form_msg | #107 | rc | #361 | <clear> |
block_msg | #107 | rc | #361 | <clear> |
attack_on_block | #107 | rc | #361 | <clear> |
last_stunned | #107 | rc | #361 | <clear> |
nude_descs | #107 | rc | #361 | <clear> |
skills | #107 | rc | #361 | <clear> |
explode_msg | #107 | rc | #361 | <clear> |
death_listeners | #107 | rc | #361 | <clear> |
queue | #92 | r | #361 | <clear> |
preemptible | #92 | r | #361 | 1 |
executing | #92 | r | #361 | <clear> |
process_queue | #92 | r | #361 | <clear> |
help_msg | #92 | rc | #361 | <clear> |
last_action | #92 | r | #361 | <clear> |
article | #92 | rc | #361 | <clear> |
last_last_action | #92 | rc | #361 | <clear> |
action_count | #92 | rc | #361 | <clear> |
aliases | #1 | r | #362 | {"player"} |
description | #1 | rc | #361 | "You see a wizard who chooses not to reveal its true appearance." |
object_size | #1 | r | #29 | {76079, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #50 generic programmer → #2 generic builder → #89 generic immortal → #33 generic normal player → #6 generic player → #100 generic RPG player → #154 generic living creature → #107 generic creature → #92 generic actor → #1 root
Children: #361 Wizard
Call graph
Showing 48 of 130 verbs; 82 not shown.
Source
@chown*#
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)) 57oldowner = object.owner; 58newowner = owner; 59chowned = is_a(object, $area) ? object:chown(newowner) | $wiz_utils:set_owner(object, owner); 60player:notify(tostr(chowned) && (((((("Object ownership of " + $su:nn(object)) + " changed from ") + $su:nn(oldowner)) + " to ") + $su:nn(newowner)) + ".")); 61endif 62endif
@shout
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($ansi.bold_on); 12person:notify(tostr(player.name, " ", shout, ", \"", argstr, "\"")); 13person:notify($ansi.bold_off); 14endif 15endfor 16player:notify(tostr("You shout, \"", argstr, "\""));
@programmer
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
Referenced by
none
Source
1player:tell("derp"); 2"NEVER USE THIS VERB! It is here for archival purposes only. It deletes everything."; 3"raise(E_PERM)"; 4"return 0"; 5if (!player.wizard) 6player:notify("Nice try, but permission denied."); 7return; 8elseif (args == {}) 9player: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.")); 10recycle(o); 11return; 12elseif (toobj(toint(args[1])) != max_object()) 13player:notify(tostr("Nice try, but you mistyped the self-destruct password. Type '", verb, "' again to get a new password.")); 14return; 15elseif (verb_info($wiz, verb)[1] != player) 16player:notify("Sorry, but you must own this verb in order to use it."); 17return; 18endif 19"----------------------------------------"; 20player:notify("Blowing away $local..."); 21$local = #-1; 22"----------------------------------------"; 23player:notify("Identifying objects to be saved..."); 24saved = {#0, player}; 25saved_props = {}; 26for p in (properties(#0)) 27v = #0.(p); 28if (((typeof(v) == OBJ) && valid(v)) && (v in $core)) 29saved = setadd(saved, v); 30saved_props = {@saved_props, p}; 31endif 32endfor 33for o in (saved) 34"Also save non-$ objects that are ancestors of $ objects"; 35"but leave out non-$ player classes and room classes"; 36"Come to think of it, what's the point of this? Can't we just give the generic gendered object a $-name? --Nosredna"; 37if ((!$object_utils:isa(o, $player)) && (!$object_utils:isa(o, $room))) 38p = parent(o); 39while (valid(p)) 40saved = setadd(saved, p); 41p = parent(p); 42endwhile 43endif 44endfor 45$player_class = $mail_recipient_class; 46"----------------------------------------"; 47player:notify("Killing all queued tasks ..."); 48for t in (queued_tasks()) 49kill_task(t[1]); 50endfor 51"----------------------------------------"; 52player:notify("Stripping you of any personal verbs and/or properties ..."); 53suspend(0); 54for i in [1..length(verbs(player))] 55delete_verb(player, 1); 56endfor 57for p in (properties(player)) 58delete_property(player, p); 59endfor 60chparent(player, $wiz); 61for p in ($object_utils:all_properties(player)) 62clear_property(player, p); 63endfor 64player.name = "Wizard"; 65player.aliases = {"Wizard"}; 66player.description = ""; 67player.key = 0; 68player.ownership_quota = 100; 69player.password = 0; 70player.last_password_time = 0; 71$gender_utils:set(player, "neuter"); 72"----------------------------------------"; 73suspend(0); 74player:notify("Making you or $hacker the owner of every saved object, verb and property ..."); 75for i in [1..length(saved)] 76if ($command_utils:running_out_of_time()) 77suspend(0); 78player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ...")); 79endif 80o = saved[i]; 81if (valid(o.owner) && o.owner.wizard) 82o.owner = player; 83else 84o.owner = $hacker; 85endif 86old_verbs = {}; 87for j in [1..length(verbs(o))] 88if ((seconds_left() < 1) || (ticks_left() < 2000)) 89suspend(0); 90player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ...")); 91endif 92info = verb_info(o, j); 93if (valid(info[1]) && info[1].wizard) 94info = listset(info, player, 1); 95else 96info = listset(info, $hacker, 1); 97endif 98set_verb_info(o, j, info); 99if (index(info[3], "(old)")) 100old_verbs = {j, @old_verbs}; 101endif 102endfor 103for vname in (old_verbs) 104delete_verb(o, vname); 105endfor 106for p in ($object_utils:all_properties(o)) 107if ((seconds_left() < 2) || (ticks_left() < 2000)) 108suspend(0); 109player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ...")); 110endif 111info = property_info(o, p); 112if (valid(info[1]) && info[1].wizard) 113info = listset(info, player, 1); 114else 115info = listset(info, $hacker, 1); 116endif 117set_property_info(o, p, info); 118endfor 119endfor 120"----------------------------------------"; 121player:notify("Removing all unsaved :recycle and :exitfunc verbs ..."); 122for o in [#0..max_object()] 123i = toint(o); 124if (i && ((i % 1000) == 0)) 125player:notify(tostr("... ", o)); 126endif 127$command_utils:suspend_if_needed(0); 128if (valid(o) && (!(o in saved))) 129for v in ({"recycle", "exitfunc"}) 130while ($object_utils:defines_verb(o, v)) 131delete_verb(o, v); 132endwhile 133endfor 134endif 135endfor 136"----------------------------------------"; 137player:notify("Recycling unsaved objects ..."); 138add_property(this, "mcd_pos", toint(max_object()), {player, "r"}); 139add_property(this, "mcd_save", {saved, saved_props}, {player, "r"}); 140suspend(0); 141this:mcd_2(saved, saved_props);
@dump-d*atabase
Referenced by
none
Source
1set_task_perms(player); 2dump_database(); 3player:notify("Dumping...");
@who-calls
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
Referenced by
- #49:make-core-database line 141:
this:mcd_2 - #49:mcd_2 line 16:
this:mcd_2 - #49:coredat line 108:
this:mcd_2
Source
1"NEVER USE THIS VERB! It is here for archival purposes only. It deletes everything."; 2"see also make-core-database."; 3"raise(E_PERM)"; 4"return 0"; 5if (!caller_perms().wizard) 6return; 7elseif (!("mcd_pos" in properties(this))) 8return; 9endif 10end = this.mcd_pos; 11saved = args[1]; 12saved_props = args[2]; 13player:notify(tostr("*** Recycling from #", end, " ...")); 14suspend(0); 15fork (0) 16this:mcd_2(saved, saved_props); 17endfork 18for i in [0..end] 19this.mcd_pos = end - i; 20o = toobj(end - i); 21if ($command_utils:running_out_of_time()) 22return; 23endif 24if (valid(o) && (!(o in saved))) 25for x in (o.contents) 26move(x, #-1); 27endfor 28if (is_player(o)) 29o.features = {}; 30set_player_flag(o, 0); 31endif 32recycle(o); 33endif 34endfor 35delete_property(this, "mcd_pos"); 36"----------------------------------------"; 37suspend(0); 38player:notify("Killing queued tasks ..."); 39for t in (queued_tasks()) 40kill_task(t[1]); 41endfor 42"----------------------------------------"; 43player:notify("Compacting object numbers ..."); 44alist = {}; 45for p in (saved_props) 46$command_utils:suspend_if_needed(0); 47if (pair = $list_utils:assoc(#0.(p), alist)) 48#0.(p) = pair[2]; 49elseif (#0.(p) != player) 50old = #0.(p); 51#0.(p) = renumber(#0.(p)); 52alist = {@alist, {old, #0.(p)}}; 53endif 54endfor 55for o in (saved) 56if (valid(o) && (o != player)) 57renumber(o); 58endif 59endfor 60reset_max_object(); 61"----------------------------------------"; 62player:notify("Performing miscellaneous cleanups ..."); 63for o in [#0..max_object()] 64$command_utils:suspend_if_needed(0); 65try 66if (o == player) 67move(o, $player_start); 68elseif ($object_utils:isa(o, $mail_recipient)) 69move(o, $mail_agent); 70else 71move(o, #-1); 72endif 73except e (ANY) 74player:notify(tostr("Couldn't move ", o, " => ", e[2])); 75player:notify(toliteral(e[4])); 76endtry 77if ($object_utils:has_callable_verb(o, "init_for_core")) 78try 79o:init_for_core(); 80except e (ANY) 81player:notify(tostr("Error from ", o, ":init_for_core => ", e[2])); 82player:notify(toliteral(e[4])); 83endtry 84endif 85endfor 86player:notify("Re-measuring everything ..."); 87for o in [#0..max_object()] 88$command_utils:suspend_if_needed(0); 89if (o != $spell) 90$byte_quota_utils:object_bytes(o); 91endif 92endfor 93$wiz_utils:initialize_owned(); 94$byte_quota_utils:summarize_one_user(player); 95delete_property(this, "mcd_save"); 96player:notify("Core database extraction is complete. Type @shutdown to save it.");
@toad @toad! @toad!!
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
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
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
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
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
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
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 20player:tell("This was disabled because it sucked and we didn't even know that it existed anyway. Use seccheck."); 21endif
@make-player
Referenced by
none
Source
1"Creates a player or orphan."; 2"Syntax: @make-player/@make-orphan 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
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
Referenced by
- #49:@programmer line 14:
this:programmer_victim_msg - #49:@programmer line 17:
this:programmer_msg
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 (!valid(dobj)) 7return; 8endif 9if (typeof(m) != LIST) 10return $string_utils:pronoun_sub(m); 11elseif ((this.location == dobj.location) || (length(m) < 2)) 12return $string_utils:pronoun_sub(m[1]); 13else 14return $string_utils:pronoun_sub(m[2]); 15endif
@newt
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
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
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
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
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
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)) 9else 10"*way* too much copied code in here from @who... Sorry. --yduJ"; 11su = $string_utils; 12conn = connected_players(); 13unsorted = {}; 14for g in ($object_utils:leaves($guest)) 15if (g in conn) 16unsorted = {@unsorted, g}; 17endif 18endfor 19if (!unsorted) 20player:tell("No guests found."); 21return; 22endif 23footnotes = {}; 24alist = {}; 25nwidth = length("Player name"); 26for u in (unsorted) 27pref = u.programmer ? "% " | " "; 28u.programmer && (footnotes = setadd(footnotes, "prog")); 29u3 = {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))}; 30nwidth = max(length(u3[1]), nwidth); 31if ($login:blacklisted(where)) 32where = "(*) " + where; 33footnotes = setadd(footnotes, "black"); 34elseif ($login:graylisted(where)) 35where = "(+) " + where; 36footnotes = setadd(footnotes, "gray"); 37endif 38alist = {@alist, u3}; 39$command_utils:suspend_if_needed(0); 40endfor 41alist = $list_utils:sort_alist_suspended(0, alist, 3); 42$command_utils:suspend_if_needed(0); 43headers = {"Player name", "Connected", "Idle Time", "From Where"}; 44time_width = length("59 minutes") + 2; 45before = {0, w1 = nwidth + 3, w2 = w1 + time_width, w3 = w2 + time_width}; 46tell1 = " " + headers[1]; 47tell2 = " " + su:space(headers[1], "-"); 48for j in [2..4] 49tell1 = su:left(tell1, before[j]) + headers[j]; 50tell2 = su:left(tell2, before[j]) + su:space(headers[j], "-"); 51endfor 52player:notify(tell1); 53player:notify(tell2); 54active = 0; 55for a in (alist) 56$command_utils:suspend_if_needed(0); 57tell1 = a[1]; 58for j in [2..4] 59tell1 = su:left(tell1, before[j]) + tostr(a[j]); 60endfor 61player:notify(tell1[1..min($, 79)]); 62endfor 63if (footnotes) 64player:notify(""); 65if ("prog" in footnotes) 66player:notify(" % == programmer."); 67endif 68if ("black" in footnotes) 69player:notify("(*) == blacklisted site."); 70endif 71if ("gray" in footnotes) 72player:notify("(+) == graylisted site."); 73endif 74endif 75player:tell("@guests display complete."); 76endif
@rn mail_catch_up check_mail_lists current_message set_current_message get_current_message make_current_message kill_current_message @nn
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
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 = $network:is_numeric_ip(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
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:title(), " has no :init_for_core verb. Strongly consider adding one before doing anything else."); 27else 28player:tell("Corified ", $string_utils:nn(dobj), " as $", iobjstr, "."); 29endif
@make-guest
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
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
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]} | {}; 21else 22start = duration = 0; 23reason = fw[2] ? {fw[2]} | {}; 24endif 25if (!reason) 26reason = {$command_utils:read("reason for resetting programmer flag")}; 27endif 28if (duration) 29reason = {tostr("for ", $time_utils:english_time(duration)), @reason}; 30endif 31if ($command_utils:player_match_failed(victim = $string_utils:match_player(fw[1]), fw[1])) 32"...done..."; 33elseif (result = $wiz_utils:unset_programmer(victim, reason, @start ? {start, duration} | {})) 34player:notify(tostr(victim.name, " (", victim, ") is no longer a programmer.", duration ? tostr(" This restriction will be lifted in ", $string_utils:from_seconds(duration), ".") | "")); 35elseif (result == E_NONE) 36player:notify(tostr(victim.name, " (", victim, ") was already a nonprogrammer...")); 37else 38player:notify(tostr(result)); 39endif
display_list
Referenced by
- #49:@blacklist line 16:
this:display_list
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
Referenced by
- #49:@blacklist line 20:
this:parse_templist_duration - #49:@deprog*rammer line 13:
this:parse_templist_duration
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
Referenced by
- #49:@blacklist line 53:
this:check_site_entries - #49:@blacklist line 84:
this:check_site_entries
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!
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
__fix
Referenced by
none
Source
1"...was on $player, now archived here for posterity..."; 2"Runs the old->new format conversion on every message in this.messages."; 3" => 1 if successful"; 4" => 0 if anything toward happened during a suspension"; 5" (e.g., new message received, someone deleted stuff) "; 6" in which case this.messages is left as if this routine were never run."; 7if (!$perm_utils:controls(caller_perms(), this)) 8return E_PERM; 9endif 10msgs = {}; 11i = 1; 12for m in (oldmsgs = this.messages) 13msgs = {@msgs, {m[1], $mail_agent:__convert_new(@m[2])}}; 14if ($command_utils:running_out_of_time()) 15player:notify(tostr("...", i, " ", this)); 16suspend(0); 17if (oldmsgs != this.messages) 18return 0; 19endif 20endif 21i = i + 1; 22endfor 23this.messages = msgs; 24return 1;
toad_cleanup
Referenced by
- #49:@toad line 37:
this:toad_cleanup
Source
1if ((!player.wizard) || (caller != this)) 2raise(E_PERM); 3endif 4"Noop. Placeholder verb for MOO-specific cleanups.";
@summon
Referenced by
none
Source
1who = valid(dobj) ? dobj | $su:match_player(dobjstr); 2if (!valid(who)) 3player:tell("@summon whom?"); 4else 5player:tell("Summoning ", who:dname(), "..."); 6$wiz_utils:teleport_walk(who, this.location); 7endif
reaper
Referenced by
none
Source
1for x in ($ou:leaves_suspended($player)) 2if (is_player(x)) 3t = time() - x.last_connect_time; 4t = t / ((60 * 60) * 24); 5if ((t > 14) && (!(t in connected_players()))) 6player:tell($su:nn(x), ", gone for ", t, " days"); 7endif 8endif 9endfor
@shutdown
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; 14delay = 2; 15endif 16if (!$command_utils:yes_or_no(tostr("Do you really want to shut down the server in ", delay, " minutes?"))) 17player:notify("Aborted."); 18return; 19endif 20announce_times = {}; 21if (delay > 0) 22while (delay > 0) 23announce_times = {@announce_times, delay * 60}; 24delay = delay / 2; 25endwhile 26announce_times = {@announce_times, 30, 10}; 27$shutdown_time = time() + announce_times[1]; 28endif 29$shutdown_message = tostr(player.name, " (", player, "): ", argstr); 30$shutdown_task = task_id(); 31for i in [1..length(announce_times)] 32msg = $generic_editor:fill_string(tostr("*** The server will be shut down by ", player.name, " (", player, ") in ", $time_utils:english_time(announce_times[i]), ": ", argstr, " ***")); 33"...use raw notify() since :notify() verb could be broken..."; 34for p in (connected_players()) 35for line in (msg) 36notify(p, line); 37endfor 38$command_utils:suspend_if_needed(0); 39endfor 40suspend(announce_times[i] - {@announce_times, 0}[i + 1]); 41endfor 42for p in (connected_players()) 43notify(p, tostr("*** Server shutdown by ", player.name, " (", player, "): ", argstr, " ***")); 44boot_player(p); 45endfor 46suspend(0); 47$shutdown_task = E_NONE; 48set_task_perms(player); 49shutdown(argstr);
@recycle-recursive
Referenced by
none
Source
1if (!player.wizard) 2player:tell("Sorry."); 3return; 4endif 5target = dobj; 6if (!valid(target)) 7player:tell(("Couldn't find '" + dobjstr) + "'."); 8return; 9endif 10player:tell("This will recycle all of the following:"); 11objs = $ou:all_contents(target); 12for x in ($ou:all_contents(target)) 13player:tell("- " + $su:nn(x)); 14endfor 15player:tell("- " + $su:nn(target)); 16if (!$cu:yes_or_no(("Do you really want to recycle " + $su:nn(target)) + " and EVERYTHING inside? YOU CANNOT UNDO THIS OPERATION!")) 17player:tell("Aborted."); 18return; 19endif 20$wiz_utils:recursive_recycle(target, player);
@prog-check
Referenced by
none
Source
1if (player != this) 2player:tell("Go away."); 3return; 4endif 5no = {}; 6maybe = {}; 7now = time(); 8too_long_ago = now - (86400 * 60); 9special = {#36, #984, #71, #5995, #65139}; 10for p in ($ou:leaves($prog)) 11if (p in special) 12continue; 13endif 14if (is_a(p, #21279)) 15continue; 16endif 17if (p.wizard) 18continue; 19endif 20if (((p in $login.newted) || (p.password == "")) || (p.password == "scrambled")) 21no = {@no, {p, "scrambled"}}; 22continue; 23endif 24if (p.last_connect_time <= too_long_ago) 25no = {@no, {p, "inactive"}}; 26continue; 27endif 28if ((p.owned_objects == {p}) || (!p.owned_objects)) 29no = {@no, {p, "no objects"}}; 30continue; 31endif 32weeks = max(1.0, tofloat(((now - p.first_connect_time) / 86400) / 7)); 33if ((tofloat(length(p.owned_objects)) / weeks) <= 0.7) 34maybe = {@maybe, {p, "few objects"}}; 35continue; 36endif 37$cu:sin(); 38endfor 39player:tell("The following ", tostr(length(no)), " programmers should probably be removed:"); 40player:tell($su:left("Player name", 25), $su:left("Last disconnect time", 28), $su:right("Objs", 7), $su:right("Age", 5), " Reason"); 41for pr in (no) 42{p, r} = pr; 43t = $time_utils:english_time_rounded(time() - p.first_connect_time); 44t = t[1] + t[3]; 45player:tell($su:left($su:nn(p), 25), ctime(p.last_disconnect_time), $su:right(tostr(length(p.owned_objects)), 7), $su:right(t, 5), " ", r); 46endfor 47player:tell(""); 48player:tell("The following ", tostr(length(maybe)), " programmers maybe should be removed:"); 49player:tell($su:left("Player name", 25), $su:left("Last disconnect time", 28), $su:right("Objs", 7), $su:right("Age", 5), " Reason"); 50for pr in (maybe) 51{p, r} = pr; 52t = $time_utils:english_time_rounded(time() - p.first_connect_time); 53t = t[1] + t[3]; 54player:tell($su:left($su:nn(p), 25), ctime(p.last_disconnect_time), $su:right(tostr(length(p.owned_objects)), 7), $su:right(t, 5), " ", r); 55endfor 56player:tell("");
@old-grant
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
@run-profiler
Referenced by
none
Source
1"Run the profiler for five minutes, then stop."; 2if (player != this) 3raise(E_PERM); 4endif 5if (argstr) 6mins = toint(argstr); 7if (tostr(mins) != argstr) 8player:tell("Profile for how many minutes? Try just a number."); 9return; 10endif 11if (!$cu:yes_or_no(tostr("Profile for ", mins, " minutes?"))) 12player:tell("Aborting."); 13return; 14endif 15else 16mins = 5; 17endif 18$nets.prognet:sys_announce(player.name, " has initiated live profiling. Profiling will be over in ", mins, " minutes."); 19set_live_profiling(1); 20suspend(60 * 5); 21set_live_profiling(0); 22$nets.prognet:sys_announce("Live profiling is complete.");
@mailban
Referenced by
none
Source
1if (player != this) 2raise(E_PERM); 3endif 4if (p = this:parse_mailread_cmd(verb, args, "", "on", 1)) 5{folder, msgseq, curr, args} = p; 6if (has_callable_verb(folder, "_" + verb)) 7folder:("_" + verb)(msgseq, args); 8return; 9else 10player:tell("You can't use ", verb, " on *", folder.name, "."); 11endif 12endif 13player:tell("You have to ", verb, " for a specific message. Try '", verb, " # on <list>'.");
@prefcat
Referenced by
none
Source
1if (!player.wizard) 2player:tell("Eff you."); 3return; 4endif 5name = dobjstr; 6cat = iobjstr; 7if ((!name) || (!cat)) 8player:tell(verb, " <name> is <category>"); 9return; 10elseif (!(name in $prefs)) 11player:tell("No such preference."); 12return; 13endif 14pref = $prefs[name]; 15pref[2] = cat; 16$prefs[name] = pref; 17player:tell("Done.");
@commentban
Referenced by
none
Source
1if (player != this) 2raise(E_PERM); 3endif 4if ((length(args) != 5) || (args[2] != "in")) 5player:tell("Syntax: @commentban <player> in <post> on <list> [<reason>]"); 6return; 7endif 8whostr = args[1]; 9who = $su:match_player(whostr); 10if (!valid(who)) 11player:tell("I don't know who '", whostr, "' is."); 12return; 13endif 14args = args[3..$]; 15prepstr = args[2]; 16if (p = this:parse_mailread_cmd(verb, args, "", "on", 1)) 17{folder, msgseq, curr, args} = p; 18if (has_callable_verb(folder, "_" + verb)) 19folder:("_" + verb)(msgseq, args, who); 20return; 21else 22player:tell("You can't use ", verb, " on *", folder.name, "."); 23endif 24endif 25player:tell("You have to ", verb, " for a specific message. Try '", verb, " # on <list>'.");
moveto
Referenced by
none
Source
1where = args[1]; 2if (where:accept(this)) 3return pass(@args); 4endif 5return E_NACC;
@core
Referenced by
none
Source
1corecount = 0; 2noncorecount = 0; 3if (argstr) 4corename = argstr[2..$]; 5if (!has_property(#0, corename)) 6player:tell("There is no $", corename); 7return; 8endif 9coreobj = #0.(corename); 10if (argstr[1] == "+") 11if (coreobj in $core) 12player:tell($su:nn(coreobj), " is already core."); 13return; 14endif 15$core = setadd($core, coreobj); 16player:tell("Added ", $su:nn(coreobj), "."); 17elseif (argstr[1] == "-") 18if (!(coreobj in $core)) 19player:tell($su:nn(coreobj), " isn't core."); 20return; 21endif 22$core = setremove($core, coreobj); 23player:tell("Removed ", $su:nn(coreobj), "."); 24endif 25return; 26endif 27for x in (properties(#0)) 28yield; 29coreobj = #0.(x); 30if (typeof(coreobj) == OBJ) 31if (coreobj in $core) 32color = $ansi.green; 33corecount = corecount + 1; 34else 35color = $ansi.red; 36noncorecount = noncorecount + 1; 37endif 38player:tell(color, $su:left("$" + x, 25), $su:nn(coreobj), $ansi.reset); 39endif 40endfor 41player:tell(tostr(corecount), " core objects, and ", tostr(noncorecount), " non-core.");
coredat
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 15player:notify("Blowing away $local..."); 16$local = #-1; 17player:notify("Identifying objects to be saved..."); 18saved = {#0, player, #984, #141109}; 19saved_props = {}; 20for p in (properties(#0)) 21v = #0.(p); 22if (((typeof(v) == OBJ) && valid(v)) && (v in $core)) 23saved = setadd(saved, v); 24saved_props = {@saved_props, p}; 25endif 26endfor 27for o in (saved) 28if ((!$object_utils:isa(o, $player)) && (!$object_utils:isa(o, $room))) 29p = parent(o); 30while (valid(p)) 31saved = setadd(saved, p); 32p = parent(p); 33endwhile 34endif 35endfor 36this._saved = saved; 37$player_class = $mail_recipient_class; 38player:notify("Killing all queued tasks ..."); 39for t in (queued_tasks()) 40kill_task(t[1]); 41endfor 42suspend(0); 43player:notify("Making you or $hacker the owner of every saved object, verb and property ..."); 44for i in [1..length(saved)] 45if ($command_utils:running_out_of_time()) 46suspend(0); 47player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ...")); 48endif 49o = saved[i]; 50if (valid(o.owner) && o.owner.wizard) 51o.owner = player; 52else 53o.owner = $hacker; 54endif 55old_verbs = {}; 56for j in [1..length(verbs(o))] 57if ((seconds_left() < 1) || (ticks_left() < 2000)) 58suspend(0); 59player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ...")); 60endif 61info = verb_info(o, j); 62if (valid(info[1]) && info[1].wizard) 63info = listset(info, player, 1); 64else 65info = listset(info, $hacker, 1); 66endif 67set_verb_info(o, j, info); 68if (index(info[3], "(old)")) 69old_verbs = {j, @old_verbs}; 70endif 71endfor 72for vname in (old_verbs) 73delete_verb(o, vname); 74endfor 75for p in ($object_utils:all_properties(o)) 76if ((seconds_left() < 2) || (ticks_left() < 2000)) 77suspend(0); 78player:notify(tostr("... finished ", i - 1, " out of ", length(saved), " saved objects ...")); 79endif 80info = property_info(o, p); 81if (valid(info[1]) && info[1].wizard) 82info = listset(info, player, 1); 83else 84info = listset(info, $hacker, 1); 85endif 86set_property_info(o, p, info); 87endfor 88endfor 89player:notify("Removing all unsaved :recycle and :exitfunc verbs ..."); 90for o in [#0..max_object()] 91i = toint(o); 92if (i && ((i % 1000) == 0)) 93player:notify(tostr("... ", o)); 94endif 95$command_utils:suspend_if_needed(0); 96if (valid(o) && (!(o in saved))) 97for v in ({"recycle", "exitfunc"}) 98while ($object_utils:defines_verb(o, v)) 99delete_verb(o, v); 100endwhile 101endfor 102endif 103endfor 104player:notify("Recycling unsaved objects ..."); 105add_property(this, "mcd_pos", toint(max_object()), {player, "r"}); 106add_property(this, "mcd_save", {saved, saved_props}, {player, "r"}); 107suspend(0); 108this:mcd_2(saved, saved_props);