generic player #6

Parent #102Owner #2Flags obsolete1, read, fertileSource RPG Core/rpgcore-patched.db

Aliases: generic player

100 verbs · 58 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
init_for_corethis none thisrxd#622
confuncthis none thisrxd#65
disfuncthis none thisrxd#67
initializethis none thisrxd#66
acceptablethis none thisrxd#61
my_huhthis none thisrxd#635
last_huhthis none thisrxd#614
my_match_objectthis none thisrxd#62
tell_contentsthis none thisrxd#618
titlecthis none thisrxd#61
notifythis none thisrxd#664
notify_linesthis none thisrxd#68
linesplitthis none thisrxd#614
linelenthis none thisrxd#61
@moreany none nonerd#631
@wrapnone any nonerd#614
@linelen*gthany none nonerd#625
@pagelen*gthany none nonerd#635
tellthis none thisrxd#613
gag_pthis none thisrxd#624
set_gaglistthis none thisrxd#66
@gag*!any any anyrd#626
@listgag @gaglist @gaggedany none nonerxd#619
@ungagany none nonerxd#624
whodunnitthis none thisrxd#610
@ch*eck-fullany any anyrd#662
@paranoidany any anyrd#621
@sw*eepnone none nonerd#636
wh*isperany at/to thisrxd#62
pageany any anyrxd#643
receive_pagethis none thisrxd#612
page_origin_msg page_echo_msg page_absent_msgthis none thisrxd#62
i inv*entorynone none nonerd#65
look_selfthis none thisrxd#613
homenone none nonerxd#630
@sethomenone none nonerd#610
g*et takethis none nonerxd#62
@move @teleportany at/to anyrxd#641
@eject @eject! @eject!!any out of/from inside/from anyrd#632
where*is @where*isany any anyrxd#618
@whoany any anyrxd#611
@wizardsany none nonerxd#69
?* help info*rmation @helpany any anyrxd#650
display_optionthis none thisrxd#66
edit_optionthis none thisrxd#66
set_mail_option set_edit_option set_display_optionthis none thisrxd#621
@mailo*ptions @mail-o*ptions @edito*ptions @edit-o*ptions @displayo*ptions @display-o*ptionsany any anyrd#629
set_namethis none thisrxd#626
set_aliasesthis none thisrxd#648
@rename*#any at/to anyrd#692
@addalias*# @add-alias*#any at/to anyrd#6116
@rmalias*# @rm-alias*#any out of/from inside/from anyrd#697
@desc*ribeany as anyrd#69
@mess*agesany none nonerd#637
@noteditany none nonerd#61
@last-c*onnectionany none nonerxd#628
set_genderthis none thisrxd#610
@genderany none nonerd#617
set_briefthis none thisrxd#612
@modeany any anyrd#623
@exam*ineany none nonerxd#6105
exam*ineany none nonerd#610
add_featurethis none thisrxd#635
remove_featurethis none thisrxd#621
@add-feature @addfeatureany none nonerxd#633
@remove-feature @rmfeatureany none nonerxd#619
@featuresany for/about anyrxd#638
@memorynone none nonerd#632
@versionnone none nonerd#614
@uptimenone none nonerd#61
@quitnone none nonerd#63
examine_commands_okthis none thisrxd#61
is_listeningthis none thisrxd#62
movetothis none thisrxd#66
announce*_all_butthis none thisrxd#69
linewrapthis none thisrxd#63
@set-note-string @set-note-textany none nonerd#630
verb_subthis none thisrxd#66
ownership_quotathis none thisrxd#65
tell_linesthis none thisrxd#618
@lastlogany none nonerxd#643
set_linelengththis none thisrxd#615
set_pagelengththis none thisrxd#616
set_homethis none thisrxd#619
@registermeany any anyrd#664
ctimethis none thisrxd#63
@ageany none nonerd#630
newsany none nonerxd#646
@editany any anyrd#614
erase_paranoid_datathis none thisrxd#65
@move-newany any anyrd#626
notify_lines_suspendedthis none thisrxd#69
_chparentthis none thisrxd#62
@usersnone none nonerxd#64
@passwordany any anyrd#625
recyclethis none thisrxd#613
gc_gaglistthis none thisrxd#610
@ping @idlenone any anyrd#68
_pingthis none thisrxd#610
@unping @unidlenone any anyrd#61

Properties

PropertyDefinerFlagsOwnerValue
features#6r#36{}
previous_connection#6#20
email_address#6#2""
last_disconnect_time#6r#20
help#6rc#20
more_msg#6rc#2"*** More *** %n lines left. Do @more [rest|flush] for more."
linetask#6r#36{0, 0}
linesleft#6r#360
linebuffer#6#36{}
pagelen#6r#360
owned_objects#6r#2{}
linelen#6r#36-79
current_folder#6c#21
all_connect_places#6#2{}
last_connect_place#6#2"?"
brief#6rc#20
lines#6c#20
page_absent_msg#6rc#2"%N is not currently logged in."
pq#6rc#2"its"
pqc#6rc#2"Its"
page_origin_msg#6rc#2"You sense that %n is looking for you in %l."
page_echo_msg#6rc#2"Your message has been sent."
edit_options#6rc#2{}
last_connect_time#6r#20
ownership_quota#6#360
gender#6rc#2"neuter"
prc#6rc#2"Itself"
ppc#6rc#2"Its"
poc#6rc#2"It"
psc#6rc#2"It"
pr#6rc#2"itself"
pp#6rc#2"its"
po#6rc#2"it"
ps#6rc#2"it"
home#6rc#2#62
password#6#2"impossible password to type"
gaglist#6rc#2{}
paranoid#6rc#20
display_options#6rc#2{}
verb_subs#6rc#2{}
first_connect_time#6r#22147483647
size_quota#6#36{25000, 0, 0, 1}
last_password_time#6#20
last_connect_attempt#6#20
page_count_start_time#6r#2799707307
ping_task#6r#36{0, 0}
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 player"}
description#1rc#2"You see a player who should type '@describe me as ...'."
object_size#1r#36{108890, -1090650497}
html#1rc#2<clear>

Ancestry

Ancestors (nearest first): #102 subthing#1 Root Class

Children: #95 ANSI PC

Call graph

calls n6_0 #6:init_for_core n102_1 #102:init_for_core n6_0->n102_1 n55_17 #55:assoc n6_0->n55_17 n6_18 #6:tell n6_0->n6_18 n6_62 #6:add_feature n6_0->n6_62 n6_19 #6:gag_p n6_18->n6_19 n81_2 #81:add_data n6_18->n81_2 n6_24 #6:whodunnit n6_18->n6_24 n1_12 #1:tell n6_18->n1_12 n42_0 #42:controls n6_62->n42_0 n6_1 #6:confunc n6_1->n42_0 n61_10 #61:check n6_1->n61_10 n6_2 #6:disfunc n6_2->n42_0 n6_89 #6:erase_paranoid_data n6_2->n6_89 n6_96 #6:gc_gaglist n6_2->n6_96 n6_89->n42_0 n6_96->n42_0 n63_9 #63:valid n6_96->n63_9 n6_3 #6:initialize n6_3->n42_0 n1_0 #1:initialize n6_3->n1_0 n6_5 #6:my_huh n6_5->n6_18 n6_5->n42_0 n56_15 #56:validate_feature n6_5->n56_15 n59_1 #59:toint n6_5->n59_1 n59_18 #59:full_prep n6_5->n59_18 n6_5->n63_9 n6_63 #6:remove_feature n6_5->n6_63 n52_3 #52:has_callable_verb n6_5->n52_3 n56_7 #56:running_out_of_time n6_5->n56_7 n6_63->n42_0 n6_7 #6:my_match_object n20_19 #20:match_object n6_7->n20_19 n6_8 #6:tell_contents n6_8->n6_18 n6_13 #6:linelen n6_8->n6_13 n6_79 #6:tell_lines n6_8->n6_79 n20_4 #20:columnize n6_8->n20_4 n6_11 #6:notify_lines n6_79->n6_11 n6_79->n6_19 n6_79->n81_2 n6_79->n6_24 n6_9 #6:titlec n20_15 #20:capitalize n6_9->n20_15 n102_4 #102:title n6_9->n102_4 n6_10 #6:notify n6_10->n42_0 n6_12 #6:linesplit n6_10->n6_12 n6_11->n42_0 n6_11->n6_10 n6_15 #6:@wrap n6_15->n6_10 n6_16 #6:@linelen*gth n6_16->n42_0 n6_16->n6_10 n6_81 #6:set_linelength n6_16->n6_81 n6_81->n42_0 n6_17 #6:@pagelen*gth n6_17->n6_11 n6_20 #6:set_gaglist n6_20->n42_0 n6_21 #6:@gag*! n6_21->n6_18 n6_21->n6_10 n6_21->n6_20 n20_21 #20:match_player_or_object n6_21->n20_21 n20_59 #20:name_and_number n6_21->n20_59 n6_22 #6:@listgag n6_22->n6_10 n20_6 #20:english_list n6_22->n20_6 n55_4 #55:map_arg n6_22->n55_4

Showing 48 of 193 verbs; 145 not shown.

Source

init_for_core

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (caller_perms().wizard)
2pass();
3this.home = (this in {$no_one, $hacker}) ? $nothing | $player_start;
4if (a = $list_utils:assoc(this, {{$prog, {$prog_help, $builtin_function_help, $verb_help, $core_help}}, {$wiz, $wiz_help}, {$builder, {$builder_help, $rpg_objects_help}}, {$rpgamer, $rpg_help}, {$ansi_pc, $ansi_help}, {$mail_recipient_class, $mail_help}, {$frand_class, $frand_help}}))
5player:tell(this);
6this.help = a[2];
7else
8this.help = 0;
9endif
10if (this != $player)
11for p in ({"last_connect_place", "all_connect_places", "features"})
12clear_property(this, p);
13endfor
14if (this in {$rpgamer, $guest})
15this.features = {$pasting_feature, $social_feature, $channels};
16elseif (this.wizard)
17for fea in ({$pasting_feature, $social_feature, $channels, $scheduler, $reaper_feature, $rp_regulator, $puppet_strings})
18this:add_feature(fea);
19endfor
20endif
21endif
22endif

confunc

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (((valid(cp = caller_perms()) && (caller != this)) && (!$perm_utils:controls(cp, this))) && (caller != #0))
2return E_PERM;
3endif
4this:("@last-connection")();
5$news:check();

disfunc

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (((valid(cp = caller_perms()) && (caller != this)) && (!$perm_utils:controls(cp, this))) && (caller != #0))
2return E_PERM;
3endif
4this:expunge_rmm();
5this:erase_paranoid_data();
6this:gc_gaglist();
7return;

initialize

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2this.help = 0;
3return pass(@args);
4else
5return E_PERM;
6endif

acceptable

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1return !is_player(args[1]);

my_huh

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"Extra parsing of player commands.  Called by $command_utils:do_huh.";
2"This version of my_huh just handles features.";
3permissions = (((caller == this) || $perm_utils:controls(caller_perms(), this)) && $command_utils:validate_feature(@args)) ? this | $no_one;
4"verb - obvious                 pass - would be args";
5"plist - list of prepspecs that this command matches";
6"dlist and ilist - likewise for dobjspecs, iobjspecs";
7verb = args[1];
8if ($code_utils:toint(verb))
9return;
10endif
11pass = args[2];
12plist = {"any", prepstr ? $code_utils:full_prep(prepstr) | "none"};
13dlist = dobjstr ? {"any"} | {"none", "any"};
14ilist = iobjstr ? {"any"} | {"none", "any"};
15for fobj in (this.features)
16if (!$recycler:valid(fobj))
17this:remove_feature(fobj);
18elseif (`valid(loc = $object_utils:has_callable_verb(fobj, verb)[1]) ! ANY => 0')
19vargs = verb_args(loc, verb);
20if ((vargs[2] in plist) && ((vargs[1] in dlist) && (vargs[3] in ilist)))
21"(got rid of notify_huh - should write a @which command)";
22"if (this.notify_huh)";
23"player:notify(tostr(\"Using \", what.name, \" (\", what, \")\"));";
24"endif";
25set_task_perms(permissions);
26fobj:(verb)(@pass);
27"Problem with verbs of the same name. If we use which=vrb in the loop instead, we have a problem with verbs that use the variable verb.";
28return 1;
29endif
30endif
31if ($command_utils:running_out_of_time())
32player:tell("You have too many features.  Parsing your command runs out of ticks while checking ", fobj.name, " (", fobj, ").");
33return 1;
34endif
35endfor

last_huh

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":last_huh(verb,args)  final attempt to parse a command...";
2set_task_perms(caller_perms());
3{verb, args} = args;
4if ((verb[1] == "@") && (prepstr == "is"))
5"... set or show _msg property ...";
6set_task_perms(player);
7$last_huh:(verb)(@args);
8return 1;
9elseif (verb in {"give", "hand", "get", "take", "drop", "throw"})
10$last_huh:(verb)(@args);
11return 1;
12else
13return 0;
14endif

my_match_object

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":my_match_object(string [,location])";
2return $string_utils:match_object(@{@args, this.location}[1..2], this);

tell_contents

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1c = args[1];
2if (c)
3longear = {};
4gear = {};
5width = player:linelen();
6half = width / 2;
7player:tell("Carrying:");
8for thing in (c)
9cx = tostr(" ", thing:title());
10if (length(cx) > half)
11longear = {@longear, cx};
12else
13gear = {@gear, cx};
14endif
15endfor
16player:tell_lines($string_utils:columnize(gear, 2, width));
17player:tell_lines(longear);
18endif

titlec

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1return `this.namec ! E_PROPNF => 0' ? this.namec | $string_utils:capitalize(this:title());

notify

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1line = args[1];
2if (this.pagelen)
3if (!(this in connected_players()))
4"...drop it on the floor...";
5return 0;
6elseif ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
7return E_PERM;
8endif
9"...need wizard perms if this and this.owner are different, since...";
10"...only this can notify() and only this.owner can read .linebuffer...";
11if ((player == this) && (this.linetask[2] != task_id()))
12"...player has started a new task...";
13"....linetask[2] is the taskid of the most recent player task...";
14if (this.linetask[2] != this.linetask[1])
15this.linesleft = this.pagelen - 2;
16endif
17this.linetask[2] = task_id();
18endif
19"... digest the current line...";
20if (this.linelen > 0)
21lbuf = {@this.linebuffer, @this:linesplit(line, this.linelen)};
22else
23lbuf = {@this.linebuffer, line};
24endif
25"... print out what we can...";
26if (this.linesleft)
27howmany = min(this.linesleft, length(lbuf));
28for l in (lbuf[1..howmany])
29notify(this, l);
30endfor
31this.linesleft = this.linesleft - howmany;
32lbuf[1..howmany] = {};
33endif
34if (lbuf)
35"...see if we need to say ***More***";
36if (this.linetask[1] != this.linetask[2])
37"....linetask[1] is the taskid of the most recent player task";
38"...   for which ***More*** was printed...";
39this.linetask[1] = this.linetask[2];
40fork (0)
41if (lb = this.linebuffer)
42notify(this, strsub(this.more_msg, "%n", tostr(length(lb))));
43endif
44endfork
45endif
46llen = length(lbuf);
47if (llen > 500)
48"...way too much saved text, flush some of it...";
49lbuf[1..llen - 100] = {"*** buffer overflow, lines flushed ***"};
50endif
51endif
52this.linebuffer = lbuf;
53else
54if (caller != this)
55set_task_perms(caller_perms());
56endif
57if (this.linelen > 0)
58for l in (this:linesplit(line, this.linelen))
59notify(this, l);
60endfor
61else
62notify(this, line);
63endif
64endif

notify_lines

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (($perm_utils:controls(caller_perms(), this) || (caller == this)) || (caller_perms() == this))
2set_task_perms(caller_perms());
3for line in ((typeof(lines = args[1]) != LIST) ? {lines} | lines)
4this:notify(tostr(line));
5endfor
6else
7return E_PERM;
8endif

linesplit

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":linesplit(line,len) => list of substrings of line";
2"used by :notify to split up long lines if .linelen>0";
3{line, len} = args;
4cline = {};
5while (length(line) > len)
6cutoff = rindex(line[1..len], " ");
7if (nospace = cutoff < ((4 * len) / 5))
8cutoff = len + 1;
9nospace = line[cutoff] != " ";
10endif
11cline = {@cline, line[1..cutoff - 1]};
12line = (nospace ? " " | "") + line[cutoff..$];
13endwhile
14return {@cline, line};

linelen

Spec this none thisFlags rxdOwner #36Definer #6

Referenced by

Source

1return abs(this.linelen);

@more

Spec any none noneFlags rdOwner #2Definer #6

Referenced by

Source

1if (player != this)
2"... somebody's being sneaky...";
3"... Can't do set_task_perms(player) since we need to be `this'...";
4"... to notify and `this.owner' to change +c properties...";
5return;
6elseif (!(lbuf = this.linebuffer))
7this.linesleft = this.pagelen - 2;
8notify(this, "*** No more ***");
9elseif (index("flush", dobjstr || "x") == 1)
10this.linesleft = this.pagelen - 2;
11notify(this, tostr("*** Flushed ***  ", length(lbuf), " lines"));
12this.linebuffer = {};
13elseif ((index("rest", dobjstr || "x") == 1) || (!this.pagelen))
14this.linesleft = this.pagelen - 2;
15for l in (lbuf)
16notify(this, l);
17endfor
18this.linebuffer = {};
19else
20howmany = min(this.pagelen - 2, llen = length(lbuf = this.linebuffer));
21for l in (lbuf[1..howmany])
22notify(this, l);
23endfor
24this.linesleft = (this.pagelen - 2) - howmany;
25this.linebuffer = lbuf[howmany + 1..llen];
26if (howmany < llen)
27notify(this, strsub(this.more_msg, "%n", tostr(llen - howmany)));
28this.linetask[1] = task_id();
29endif
30endif
31this.linetask[2] = task_id();

@wrap

Spec none any noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1if (player != this)
2"... someone is being sneaky...";
3"... Can't do set_task_perms(player) since we need to be `this'...";
4"... to notify and `this.owner' to change +c properties...";
5return;
6endif
7linelen = player.linelen;
8if (!(prepstr in {"on", "off"}))
9player:notify("Usage:  @wrap on|off");
10player:notify(tostr("Word wrap is currently ", (linelen > 0) ? "on" | "off", "."));
11return;
12endif
13player.linelen = abs(linelen) * ((prepstr == "on") ? 1 | -1);
14player:notify(tostr("Word wrap is now ", prepstr, "."));

@linelen*gth

Spec any none noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1if (callers() ? (caller != this) && (!$perm_utils:controls(caller_perms(), this)) | (player != this))
2"... somebody is being sneaky ...";
3return;
4endif
5curlen = player.linelen;
6wrap = curlen > 0;
7wrapstr = wrap ? "on" | "off";
8if (!dobjstr)
9player:notify(tostr("Usage:  ", verb, " <number>"));
10player:notify(tostr("Current line length is ", abs(curlen), ".  Word wrapping is ", wrapstr, "."));
11return;
12endif
13newlen = toint(dobjstr);
14if (newlen < 0)
15player:notify("Line length can't be a negative number.");
16return;
17elseif (newlen < 10)
18player:notify("You don't want your linelength that small.  Setting it to 10.");
19newlen = 10;
20endif
21this:set_linelength(newlen);
22player:notify(tostr("Line length is now ", abs(player.linelen), ".  Word wrapping is ", wrapstr, "."));
23if (!wrap)
24player:notify("To enable word wrapping, type `@wrap on'.");
25endif

@pagelen*gth

Spec any none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1"@pagelength number  -- sets page buffering to that many lines (or 0 to turn off page buffering)";
2if (player != this)
3"... somebody is being sneaky ...";
4"... Can't do set_task_perms(player) since we need to be `this'...";
5"... to notify and `this.owner' to change +c properties...";
6return;
7elseif (!dobjstr)
8notify(player, tostr("Usage:  ", verb, " <number>"));
9notify(player, tostr("Current page length is ", player.pagelen, "."));
10return;
11elseif (0 > (newlen = toint(dobjstr)))
12notify(player, "Page length can't be a negative number.");
13return;
14elseif (newlen == 0)
15player.pagelen = 0;
16notify(player, "Page buffering off.");
17if (lb = this.linebuffer)
18"queued text remains";
19this:notify_lines(lb);
20clear_property(this, "linebuffer");
21endif
22elseif (newlen < 5)
23player.pagelen = 5;
24notify(player, "Too small.  Setting it to 5.");
25else
26notify(player, tostr("Page length is now ", player.pagelen = newlen, "."));
27endif
28if (this.linebuffer)
29notify(this, strsub(this.more_msg, "%n", tostr(length(this.linebuffer))));
30player.linetask = {task_id(), task_id()};
31player.linesleft = 0;
32else
33player.linetask = {0, task_id()};
34player.linesleft = player.pagelen - 2;
35endif

tell

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (this.gaglist || this.paranoid)
2"Check the above first, default case, to save ticks.  Paranoid gaggers are cost an extra three or so ticks by this, probably a net savings.";
3if (this:gag_p())
4return;
5endif
6if (this.paranoid == 1)
7$paranoid_db:add_data(this, {{@callers(), {player, "<cmd-line>", player}}, args});
8elseif (this.paranoid == 2)
9z = this:whodunnit({@callers(), {player, "", player}}, {this, $no_one}, {})[3];
10args = {"(", z.name, " ", z, ") ", @args};
11endif
12endif
13pass(@args);

gag_p

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (player in this.gaglist)
2return 1;
3elseif (gag = this.gaglist)
4for x in (callers())
5if (((x[1] == #-1) && (x[3] == #-1)) && (x[2] != ""))
6elseif ((x[1] in gag) || (x[4] in gag))
7return 1;
8endif
9endfor
10endif
11return 0;
12"--- old definition --";
13if (player in this.gaglist)
14return 1;
15elseif (this.gaglist)
16for x in (callers())
17if (valid(x[1]))
18if (x[1] in this.gaglist)
19return 1;
20endif
21endif
22endfor
23endif
24return 0;

set_gaglist

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":set_gaglist(@newlist) => this.gaglist = newlist";
2if (!((caller == this) || $perm_utils:controls(caller_perms(), this)))
3return E_PERM;
4else
5return this.gaglist = args;
6endif

@gag*!

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(player);
2if (player != this)
3player:notify("Permission denied.");
4return;
5endif
6if (!args)
7player:notify(tostr("Usage:  ", verb, " <player or object> [<player or object>...]"));
8return;
9endif
10victims = $string_utils:match_player_or_object(@args);
11changed = 0;
12for p in (victims)
13if (p in player.gaglist)
14player:notify(tostr("You are already gagging ", p.name, "."));
15elseif (p == player)
16player:notify("Gagging yourself is a bad idea.");
17elseif (children(p) && (verb != "@gag!"))
18player:tell("If you really want to gag all descendents of ", $string_utils:nn(p), ", use `@gag! ", p, "' instead.");
19else
20changed = 1;
21player:set_gaglist(@setadd(this.gaglist, p));
22endif
23endfor
24if (changed)
25this:("@listgag")();
26endif

@listgag @gaglist @gagged

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(valid(caller_perms()) ? caller_perms() | player);
2if (!this.gaglist)
3player:notify(tostr("You are ", callers() ? "no longer gagging anything." | "not gagging anything right now."));
4else
5player:notify(tostr("You are ", callers() ? "now" | "currently", " gagging ", $string_utils:english_list($list_utils:map_arg(2, $string_utils, "pronoun_sub", "%n (%#)", this.gaglist)), "."));
6endif
7gl = {};
8if (args)
9player:notify("Searching for players who may be gagging you...");
10for p in (players())
11if ((typeof(`p.gaglist ! E_PERM') == LIST) && (this in p.gaglist))
12gl = {@gl, p};
13endif
14$command_utils:suspend_if_needed(10, "...searching gaglist...");
15endfor
16if (gl || (!callers()))
17player:notify(tostr($string_utils:english_list($list_utils:map_arg(2, $string_utils, "pronoun_sub", "%n (%#)", gl), "No one"), " appear", (length(gl) <= 1) ? "s" | "", " to be gagging you."));
18endif
19endif

@ungag

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1if ((player != this) || ((caller != this) && (!$perm_utils:controls(caller_perms(), this))))
2player:notify("Permission denied.");
3elseif (dobjstr == "")
4player:notify(tostr("Usage:  ", verb, " <player>  or  ", verb, " everyone"));
5elseif (dobjstr == "everyone")
6this.gaglist = {};
7player:notify("You are no longer gagging anyone or anything.");
8else
9if (valid(dobj))
10match = dobj;
11elseif ((match = toobj(dobjstr)) > #0)
12else
13match = $string_utils:match(dobjstr, this.gaglist, "name", this.gaglist, "aliases");
14endif
15if (match == $failed_match)
16player:notify(tostr("You don't seem to be gagging anything named ", dobjstr, "."));
17elseif (match == $ambiguous_match)
18player:notify(tostr("I don't know which \"", dobjstr, "\" you mean."));
19else
20this.gaglist = setremove(this.gaglist, match);
21player:notify(tostr(valid(match) ? match.name | match, " removed from gag list."));
22endif
23this:("@listgag")();
24endif

whodunnit

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1{record, trust, mistrust} = args;
2s = {this, "???", this};
3for w in (record)
4if (((((!valid(s[3])) || s[3].wizard) || (s[3] in trust)) && (!(s[3] in mistrust))) || (s[1] == this))
5s = w;
6else
7return s;
8endif
9endfor
10return s;

@ch*eck-full

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1responsible = $paranoid_db:get_data(this);
2if (length(verb) <= 6)
3"@check, not @check-full";
4n = 5;
5trust = {this, $no_one};
6"... trust no one, my friend.... no one....  --Herod";
7mistrust = {};
8for k in (args)
9if (z = $code_utils:toint(k))
10n = z;
11elseif (k[1] == "!")
12mistrust = listappend(mistrust, $string_utils:match_player(k[2..$]));
13else
14trust = listappend(trust, $string_utils:match_player(k));
15endif
16endfor
17msg_width = player:linelen() - 60;
18for q in ((n > (y = length(responsible))) ? responsible | responsible[(y - n) + 1..y])
19msg = tostr(@q[2]);
20if (length(msg) > msg_width)
21msg = msg[1..msg_width];
22endif
23s = this:whodunnit(q[1], trust, mistrust);
24text = valid(s[1]) ? s[1].name | "** NONE **";
25this:notify(tostr($string_utils:left(tostr((length(text) > 13) ? text[1..13] | text, " (", s[1], ")"), 20), $string_utils:left(s[2], 15), $string_utils:left(tostr((length(s[3].name) > 13) ? s[3].name[1..13] | s[3].name, " (", s[3], ")"), 20), msg));
26endfor
27this:notify("*** finished ***");
28else
29"@check-full, from @traceback by APHiD";
30"s_i_n's by Ho_Yan 10/18/94";
31matches = {};
32if (length(match = argstr) == 0)
33player:notify(tostr("Usage: ", verb, " <string> --or-- ", verb, " <number>"));
34return;
35endif
36if (!responsible)
37player:notify("No text has been saved by the monitor.  (See `help @paranoid').");
38else
39if (typeof(x = $code_utils:toint(argstr)) == ERR)
40for line in (responsible)
41if (index(tostr(@line[$]), argstr))
42matches = {@matches, line};
43endif
44endfor
45else
46matches = responsible[($ - x) + 1..$];
47endif
48if (matches)
49for match in (matches)
50$command_utils:suspend_if_needed(3);
51text = tostr(@match[$]);
52player:notify("Traceback for:");
53player:notify(text);
54"Moved cool display code to $code_utils, 3/29/95, Ho_Yan";
55$code_utils:display_callers(listdelete(mm = match[1], length(mm)));
56endfor
57player:notify("**** finished ****");
58else
59player:notify(tostr("No matches for \"", argstr, "\" found."));
60endif
61endif
62endif

@paranoid

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1if ((args == {}) || ((typ = args[1]) == ""))
2$paranoid_db:set_kept_lines(this, 10);
3this.paranoid = 1;
4this:notify("Anti-spoofer on and keeping 10 lines.");
5elseif (index("immediate", typ))
6$paranoid_db:set_kept_lines(this, 0);
7this.paranoid = 2;
8this:notify("Anti-spoofer now in immediate mode.");
9elseif (index("off", typ) || (typ == "0"))
10this.paranoid = 0;
11$paranoid_db:set_kept_lines(this, 0);
12this:notify("Anti-spoofer off.");
13elseif ((tostr(y = toint(typ)) != typ) || (y < 0))
14this:notify(tostr("Usage: ", verb, " <lines to be kept>     to turn on your anti-spoofer."));
15this:notify(tostr("       ", verb, " off                    to turn it off."));
16this:notify(tostr("       ", verb, " immediate              to use immediate mode."));
17else
18this.paranoid = 1;
19$paranoid_db:set_kept_lines(this, y = min(y, 30));
20this:notify(tostr("Anti-spoofer on and keeping ", y, " lines."));
21endif

@sw*eep

Spec none none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1buggers = 1;
2found_listener = 0;
3here = this.location;
4for thing in (setremove(here.contents, this))
5tellwhere = $object_utils:has_verb(thing, "tell");
6notifywhere = $object_utils:has_verb(thing, "notify");
7if (thing in connected_players())
8this:notify(tostr(thing.name, " (", thing, ") is listening."));
9found_listener = 1;
10elseif ($object_utils:has_callable_verb(thing, "sweep_msg") && (typeof(msg = thing:sweep_msg()) == STR))
11this:notify(tostr(thing.name, " (", thing, ") ", msg, "."));
12found_listener = 1;
13elseif (tellwhere && (((owner = verb_info(tellwhere[1], "tell")[1]) != this) && (!owner.wizard)))
14this:notify(tostr(thing.name, " (", thing, ") has been taught to listen by ", owner.name, " (", owner, ")"));
15found_listener = 1;
16elseif (notifywhere && (((owner = verb_info(notifywhere[1], "notify")[1]) != this) && (!owner.wizard)))
17this:notify(tostr(thing.name, " (", thing, ") has been taught to listen by ", owner.name, " (", owner, ")"));
18found_listener = 1;
19endif
20endfor
21buggers = {};
22for v in ({"announce", "announce_all", "announce_all_but", "say", "emote", "huh", "here_huh", "huh2", "whisper", "here_explain_syntax"})
23vwhere = $object_utils:has_verb(here, v);
24if (vwhere && (((owner = verb_info(vwhere[1], v)[1]) != this) && (!owner.wizard)))
25buggers = setadd(buggers, owner);
26endif
27endfor
28if (buggers != {})
29if ($object_utils:has_verb(here, "sweep_msg") && (typeof(msg = here:sweep_msg()) == STR))
30this:notify(tostr(here.name, " (", here, ") ", msg, "."));
31else
32this:notify(tostr(here.name, " (", here, ") may have been bugged by ", $string_utils:english_list($list_utils:map_prop(buggers, "name")), "."));
33endif
34elseif (!found_listener)
35this:notify("Communications look secure.");
36endif

wh*isper

Spec any at/to thisFlags rxdOwner #2Definer #6

Referenced by

Source

1this:tell(player.name, " whispers, \"", dobjstr, "\"");
2player:tell("You whisper, \"", dobjstr, "\" to ", this.name, ".");

page

Spec any any anyFlags rxdOwner #2Definer #6

Referenced by

Source

1nargs = length(args);
2if (nargs < 1)
3player:notify(tostr("Usage: ", verb, " <player> [with <message>]"));
4return;
5endif
6who = $string_utils:match_player(args[1]);
7if ($command_utils:player_match_result(who, args[1])[1])
8return;
9elseif (who in this.gaglist)
10player:tell("You have ", who:title(), " @gagged.  If you paged ", $gender_utils:get_pronoun("o", who), ", ", $gender_utils:get_pronoun("s", who), " wouldn't be able to answer you.");
11return;
12endif
13"for pronoun_sub's benefit...";
14dobj = who;
15iobj = player;
16header = player:page_origin_msg();
17text = "";
18if (nargs > 1)
19if ((args[2] == "with") && (nargs > 2))
20msg_start = 3;
21else
22msg_start = 2;
23endif
24msg = $string_utils:from_list(args[msg_start..nargs], " ");
25text = tostr($string_utils:pronoun_sub(($string_utils:index_delimited(header, player.name) ? "%S" | "%N") + " %<pages>, \""), msg, "\"");
26endif
27result = text ? who:receive_page(header, text) | who:receive_page(header);
28if (result == 2)
29"not connected";
30player:tell((typeof(msg = who:page_absent_msg()) == STR) ? msg | $string_utils:pronoun_sub("%n is not currently logged in.", who));
31if (length(who.messages) > 20)
32"too much old mail to receive messages.";
33return;
34endif
35mail = text ? $command_utils:yes_or_no("Would you like the page sent as mail?") | 0;
36if (mail)
37$mail_agent:send_message(player, who, "While you were out...", {header, text});
38return player:tell("Message sent.");
39endif
40player:tell("Page cancelled.");
41else
42player:tell(who:page_echo_msg());
43endif

receive_page

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"called by $player:page.  Two args, the page header and the text, all pre-processed by the page command.  Could be extended to provide haven abilities, multiline pages, etc.  Indeed, at the moment it just does :tell_lines, so we already do have multiline pages, if someone wants to take advantage of it.";
2"Return codes:";
3"  1:  page was received";
4"  2:  player is not connected";
5"  0:  page refused";
6"If a specialization wants to refuse a page, it should return 0 to say it was refused.  If it uses pass(@args) it should propagate back up the return value.  It is possible that this code should interact with gagging and return 0 if the page was gagged.";
7if (this:is_listening())
8this:tell_lines(args);
9return 1;
10else
11return 2;
12endif

page_origin_msg page_echo_msg page_absent_msg

Spec this none thisFlags rxdOwner #36Definer #6

Referenced by

Source

1"set_task_perms(this.owner)";
2return (msg = `this.(verb) ! ANY') ? $string_utils:pronoun_sub(this.(verb), this) | "";

i inv*entory

Spec none none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1if (c = player:contents())
2this:tell_contents(c);
3else
4player:tell("You are empty-handed.");
5endif

look_self

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1player:tell(this:titlec());
2pass();
3if (!(this in connected_players()))
4player:tell($gender_utils:pronoun_sub("%{:He} %{!is} sleeping.", this));
5elseif ((idle = idle_seconds(this)) < 60)
6player:tell($gender_utils:pronoun_sub("%{:He} %{!is} awake and %{!looks} alert.", this));
7else
8time = $string_utils:from_seconds(idle);
9player:tell($gender_utils:pronoun_sub("%{:He} %{!is} awake, but %{!has} been staring off into space for ", this), time, ".");
10endif
11if (c = this:contents())
12this:tell_contents(c);
13endif

home

Spec none none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1start = this.location;
2if (start == this.home)
3player:tell("You're already home!");
4return;
5elseif (typeof(this.home) != OBJ)
6player:tell("You've got a weird home, pal.  I've reset it to the default one.");
7this.home = $player_start;
8elseif (!valid(this.home))
9player:tell("Oh no!  Your home's been recycled.  Time to look around for a new one.");
10this.home = $player_start;
11else
12player:tell("You click your heels three times.");
13endif
14this:moveto(this.home);
15if (!valid(start))
16elseif (start == this.location)
17start:announce(player.name, " ", $gender_utils:get_conj("learns", player), " that you can never go home...");
18else
19start:announce(player.name, " ", $gender_utils:get_conj("goes", player), " home.");
20endif
21if (this.location == this.home)
22this.location:announce(player.name, " ", $gender_utils:get_conj("comes", player), " home.");
23elseif (this.location == start)
24player:tell("Either home doesn't want you, or you don't really want to go.");
25else
26player:tell("Wait a minute!  This isn't your home...");
27if (valid(this.location))
28this.location:announce(player.name, " ", $gender_utils:get_conj("arrives", player), ", looking quite bewildered.");
29endif
30endif

@sethome

Spec none none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(this);
2here = this.location;
3if (!$object_utils:has_callable_verb(here, "accept_for_abode"))
4player:notify("This is a pretty odd place.  You should make your home in an actual room.");
5elseif (here:accept_for_abode(this))
6this.home = here;
7player:notify(tostr(here.name, " is your new home."));
8else
9player:notify(tostr("This place doesn't want to be your home.  Contact ", here.owner.name, " to be added to the residents list of this place, or choose another place as your home."));
10endif

g*et take

Spec this none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1player:tell("This is not a pick-up joint!");
2this:tell(player.name, " tried to pick you up.");

@move @teleport

Spec any at/to anyFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"'@move <object> to <place>' - Teleport an object. Example: '@move trash to #11' to move trash to the closet.";
2set_task_perms((caller == this) ? this | $no_one);
3dobj = this:my_match_object(dobjstr);
4iobj = this:my_match_object(iobjstr);
5if ($command_utils:object_match_failed(dobj, dobjstr) || ((iobj != $nothing) && $command_utils:object_match_failed(iobj, iobjstr)))
6return;
7endif
8if ((!$perm_utils:controls(this, dobj)) && (this != dobj))
9player:tell("You may only @move your own things.");
10return;
11endif
12old_loc = dobj.location;
13if (old_loc == iobj)
14player:tell(dobj.name, " is already ", valid(iobj) ? "in " + iobj.name | "nowhere", ".");
15return;
16endif
17dobj:moveto(iobj);
18if (dobj.location == iobj)
19player:tell("Moved.");
20if (is_player(dobj))
21if (valid(old_loc))
22old_loc:announce_all(dobj.name, " disappears suddenly for parts unknown.");
23if (dobj != player)
24dobj:tell("You have been moved by ", player.name, ".");
25endif
26endif
27if (valid(dobj.location))
28dobj.location:announce(dobj.name, " materializes out of thin air.");
29endif
30endif
31elseif (dobj.location == old_loc)
32if ($object_utils:contains(dobj, iobj))
33player:tell(iobj.name, " is inside of ", dobj.name, "!");
34else
35player:tell($string_utils:pronoun_sub("Either %d doesn't want to go, or %i doesn't want to accept %[dpo]."));
36endif
37elseif (dobj == player)
38player:tell("You have been deflected from your original destination.");
39else
40player:tell($string_utils:pronoun_sub("%D has been deflected from %[dpp] original destination."));
41endif

@eject @eject! @eject!!

Spec any out of/from inside/from anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(player);
2if (iobjstr == "here")
3iobj = player.location;
4elseif (iobjstr == "me")
5iobj = player;
6elseif ($command_utils:object_match_failed(iobj, iobjstr))
7return;
8endif
9if (!$perm_utils:controls(player, iobj))
10player:notify(tostr("You are not the owner of ", iobj.name, "."));
11return;
12endif
13if (dobjstr == "me")
14dobj = player;
15elseif (($failed_match == (dobj = $string_utils:literal_object(dobjstr))) && $command_utils:object_match_failed(dobj = iobj:match(dobjstr), dobjstr))
16return;
17endif
18if (dobj.location != iobj)
19player:notify(tostr(dobj.name, "(", dobj, ") is not in ", iobj.name, "(", iobj, ")."));
20return;
21endif
22if (dobj.wizard)
23player:notify(tostr("Sorry, you can't ", verb, " a wizard."));
24dobj:tell(player.name, " tried to ", verb, " you.");
25return;
26endif
27iobj:((verb == "@eject") ? "eject" | "eject_basic")(dobj);
28player:notify($object_utils:has_callable_verb(iobj, "ejection_msg") ? iobj:ejection_msg() | $room:ejection_msg());
29if (verb != "@eject!!")
30dobj:tell($object_utils:has_callable_verb(iobj, "victim_ejection_msg") ? iobj:victim_ejection_msg() | $room:victim_ejection_msg());
31endif
32iobj:announce_all_but({player, dobj}, $object_utils:has_callable_verb(iobj, "oejection_msg") ? iobj:oejection_msg() | $room:oejection_msg());

where*is @where*is

Spec any any anyFlags rxdOwner #2Definer #6

Referenced by

none

Source

1if (!args)
2them = connected_players();
3else
4who = $command_utils:player_match_result($string_utils:match_player(args), args);
5if (length(who) <= 1)
6if (!who[1])
7player:notify("Where is who?");
8endif
9return;
10elseif (who[1])
11player:notify("");
12endif
13them = listdelete(who, 1);
14endif
15lmax = rmax = 0;
16for p in (them)
17player:notify(tostr($string_utils:left($string_utils:nn(p), 25), " ", $string_utils:nn(p.location)));
18endfor

@who

Spec any any anyFlags rxdOwner #2Definer #6

Referenced by

Source

1if (caller != player)
2return E_PERM;
3endif
4plyrs = args ? listdelete($command_utils:player_match_result($string_utils:match_player(args), args), 1) | connected_players();
5if (!plyrs)
6return;
7elseif (length(plyrs) > 100)
8player:tell("You have requested a listing of ", length(plyrs), " players.  Please either specify individual players you are interested in, to reduce the number of players in any single request, or else use the `@users' command instead.  The lag thanks you.");
9return;
10endif
11$code_utils:show_who_listing(plyrs);

@wizards

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"@wizards [all]";
2if (caller != player)
3return E_PERM;
4endif
5if (args)
6$code_utils:show_who_listing($wiz_utils:all_wizards());
7else
8$code_utils:show_who_listing($wiz_utils:connected_wizards()) || player:notify("No wizards currently logged in.");
9endif

?* help info*rmation @help

Spec any any anyFlags rxdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(callers() ? caller_perms() | player);
2"...this code explicitly relies on being !d in several places...";
3if ((index(verb, "?") != 1) || (length(verb) <= 1))
4what = $string_utils:trimr(argstr);
5elseif (argstr)
6what = tostr(verb[2..$], " ", $string_utils:trimr(argstr));
7else
8what = verb[2..$];
9endif
10if (valid(o = this:my_match_object(what)) && (help_msg = o:help_msg()))
11return this:tell_lines(help_msg);
12endif
13"...find a db that claims to know about `what'...";
14dblist = $code_utils:help_db_list();
15result = $code_utils:help_db_search(what, dblist);
16if (!result)
17"... note: all of the last-resort stuff...";
18"... is now located on $help:find_topics/get_topic...";
19$wiz_utils:missed_help(what, result);
20player:notify(tostr("Sorry, but no help is available on `", what, "'."));
21elseif (result[1] == $ambiguous_match)
22$wiz_utils:missed_help(what, result);
23player:notify_lines(tostr("Sorry, but the topic-name `", what, "' is ambiguous.  I don't know which of the following topics you mean:"));
24for x in ($help:columnize(@$help:sort_topics(result[2])))
25player:notify(tostr("   ", x));
26endfor
27else
28{help, topic} = result;
29if (topic != what)
30player:notify(tostr("Showing help on `", topic, "':"));
31player:notify("----");
32endif
33dblist = dblist[1 + (help in dblist)..$];
34if (1 == (text = help:get_topic(topic, dblist)))
35"...get_topic took matters into its own hands...";
36elseif (text)
37"...these can get long...";
38for line in ((typeof(text) == LIST) ? text | {text})
39if (typeof(line) != STR)
40player:notify("Odd results from help -- complain to a wizard.");
41else
42player:notify(line);
43endif
44(ticks_left() < 4000) && suspend(0);
45endfor
46else
47player:notify(tostr("Help DB ", help, " thinks it knows about `", what, "' but something's messed up."));
48player:notify(tostr("Tell ", help.owner.wizard ? "" | tostr(help.owner.name, " (", help.owner, ") or "), "a wizard."));
49endif
50endif

display_option

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":display_option(name) => returns the value of the specified @display option";
2if ((caller == this) || $perm_utils:controls(caller_perms(), this))
3return $display_options:get(this.display_options, args[1]);
4else
5return E_PERM;
6endif

edit_option

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":edit_option(name) => returns the value of the specified edit option";
2if ((caller == this) || ($object_utils:isa(caller, $generic_editor) || $perm_utils:controls(caller_perms(), this)))
3return $edit_options:get(this.edit_options, args[1]);
4else
5return E_PERM;
6endif

set_mail_option set_edit_option set_display_option

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1":set_edit_option(oname,value)";
2":set_display_option(oname,value)";
3":set_mail_option(oname,value)";
4"Changes the value of the named option.";
5"Returns a string error if something goes wrong.";
6if (!((caller == this) || $perm_utils:controls(caller_perms(), this)))
7return tostr(E_PERM);
8endif
9"...this is kludgy, but it saves me from writing the same verb 3 times.";
10"...there's got to be a better way to do this...";
11verb[1..4] = "";
12foo_options = verb + "s";
13"...";
14if (typeof(s = #0.(foo_options):set(this.(foo_options), @args)) == STR)
15return s;
16elseif (s == this.(foo_options))
17return 0;
18else
19this.(foo_options) = s;
20return 1;
21endif

@mailo*ptions @mail-o*ptions @edito*ptions @edit-o*ptions @displayo*ptions @display-o*ptions

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1"@<what>-option <option> [is] <value>   sets <option> to <value>";
2"@<what>-option <option>=<value>        sets <option> to <value>";
3"@<what>-option +<option>     sets <option>   (usually equiv. to <option>=1";
4"@<what>-option -<option>     resets <option> (equiv. to <option>=0)";
5"@<what>-option !<option>     resets <option> (equiv. to <option>=0)";
6"@<what>-option <option>      displays value of <option>";
7set_task_perms(player);
8what = {"mail", "edit", "display"}[index("med", verb[2])];
9options = what + "_options";
10option_pkg = #0.(options);
11set_option = ("set_" + what) + "_option";
12if (!args)
13player:notify_lines({("Current " + what) + " options:", "", @option_pkg:show(this.(options), option_pkg.names)});
14return;
15elseif (typeof(presult = option_pkg:parse(args)) == STR)
16player:notify(presult);
17return;
18else
19if (length(presult) > 1)
20if (typeof(sresult = this:(set_option)(@presult)) == STR)
21player:notify(sresult);
22return;
23elseif (!sresult)
24player:notify("No change.");
25return;
26endif
27endif
28player:notify_lines(option_pkg:show(this.(options), presult[1]));
29endif

set_name

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"set_name(newname) attempts to change this.name to newname";
2"  => E_PERM   if you don't own this";
3"  => E_INVARG if the name is already taken or prohibited for some reason";
4"  => E_NACC   if the player database is not taking new names right now.";
5"  => E_ARGS   if the name is too long (controlled by $login.max_player_name)";
6if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
7return E_PERM;
8elseif (!is_player(this))
9"we don't worry about the names of player classes.";
10set_task_perms(caller_perms());
11return pass(@args);
12elseif ($player_db.frozen)
13return E_NACC;
14elseif (length(name = args[1]) > $login.max_player_name)
15return E_ARGS;
16elseif (!($player_db:available(name, this) in {this, 1}))
17return E_INVARG;
18else
19old = this.name;
20this.name = name;
21if ((name != old) && (!(old in this.aliases)))
22$player_db:delete(old);
23endif
24$player_db:insert(name, this);
25return 1;
26endif

set_aliases

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"set_aliases(alias_list)";
2"For changing player aliases, we check to make sure that none of the aliases match existing player names/aliases.  Aliases containing spaces are not entered in the $player_db and so are not subject to this restriction ($string_utils:match_player will not match on them, however, so they only match if used in the immediate room, e.g., with match_object() or somesuch).";
3"Also we make sure that the .name is included in the .alias list.  In any situation where .name and .aliases are both being changed, do the name change first.";
4"  => 1        if successful, and aliases changed from previous setting.";
5"  => 0        if resulting work didn't change aliases from previous.";
6"  => E_PERM   if you don't own this";
7"  => E_NACC   if the player database is not taking new aliases right now.";
8"  => E_TYPE   if alias_list is not a list";
9"  => E_INVARG if any element of alias_list is not a string";
10if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
11return E_PERM;
12elseif (!is_player(this))
13"we don't worry about the names of player classes.";
14return pass(@args);
15elseif ($player_db.frozen)
16return E_NACC;
17elseif (typeof(aliases = args[1]) != LIST)
18return E_TYPE;
19elseif ((length(aliases = setadd(aliases, this.name)) > ($object_utils:has_property($local, "max_player_aliases") ? $local.max_player_aliases | $maxint)) && (length(aliases) >= length(this.aliases)))
20return E_INVARG;
21else
22for a in (aliases)
23if (typeof(a) != STR)
24return E_INVARG;
25endif
26if ((!(index(a, " ") || index(a, "	"))) && (!($player_db:available(a, this) in {this, 1})))
27aliases = setremove(aliases, a);
28endif
29endfor
30changed = 0;
31old = this.aliases;
32this.aliases = aliases;
33for a in (old)
34if (!(a in aliases))
35$player_db:delete2(a, this);
36changed = 1;
37endif
38endfor
39for a in (aliases)
40if (!(index(a, " ") || index(a, "	")))
41$player_db:insert(a, this);
42if (!(a in old))
43changed = 1;
44endif
45endif
46endfor
47return changed;
48endif

@rename*#

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

Referenced by

none

Source

1if ((player != caller) || (player != this))
2return;
3endif
4set_task_perms(player);
5bynumber = verb == "@rename#";
6spec = $code_utils:parse_verbref(dobjstr);
7if (spec)
8if (!player.programmer)
9return player:notify(tostr(E_PERM));
10endif
11object = this:my_match_object(spec[1]);
12if (!$command_utils:object_match_failed(object, spec[1]))
13vname = spec[2];
14if (bynumber)
15vname = $code_utils:toint(vname);
16if (vname == E_TYPE)
17return player:notify("Verb number expected.");
18elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
19return player:notify("Verb number out of range.");
20endif
21endif
22try
23info = verb_info(object, vname);
24try
25result = set_verb_info(object, vname, listset(info, iobjstr, 3));
26player:notify("Verb name changed.");
27except e (ANY)
28player:notify(e[2]);
29endtry
30except (E_VERBNF)
31player:notify("That object does not define that verb.");
32except e (ANY)
33player:notify(e[2]);
34endtry
35endif
36elseif (bynumber)
37player:notify("@rename# can only be used with verbs.");
38elseif (pspec = $code_utils:parse_propref(dobjstr))
39if (!player.programmer)
40return player:notify(tostr(E_PERM));
41endif
42object = this:my_match_object(pspec[1]);
43if (!$command_utils:object_match_failed(object, pspec[1]))
44pname = pspec[2];
45try
46info = property_info(object, pname);
47try
48result = set_property_info(object, pname, {@info, iobjstr});
49player:notify("Property name changed.");
50except e (ANY)
51player:notify(e[2]);
52endtry
53except (E_PROPNF)
54player:notify("That object does not define that property.");
55except e (ANY)
56player:notify(e[2]);
57endtry
58endif
59else
60object = this:my_match_object(dobjstr);
61if (!$command_utils:object_match_failed(object, dobjstr))
62old_name = object.name;
63old_aliases = object.aliases;
64if (e = $building_utils:set_names(object, iobjstr))
65if (strcmp(object.name, old_name) == 0)
66name_message = tostr("Name of ", object, " (", old_name, ") is unchanged");
67else
68name_message = tostr("Name of ", object, " changed to \"", object.name, "\"");
69endif
70aliases = $string_utils:from_value(object.aliases, 1);
71if (object.aliases == old_aliases)
72alias_message = tostr(".  Aliases are unchanged (", aliases, ").");
73else
74alias_message = tostr(", with aliases ", aliases, ".");
75endif
76player:notify(name_message + alias_message);
77elseif (e == E_INVARG)
78player:notify("That particular name change not allowed (see help @rename).");
79if (object == player)
80player:notify($player_db:why_bad_name(player, iobjstr));
81endif
82elseif (e == E_NACC)
83player:notify("Oops.  You can't update that name right now; try again in a few minutes.");
84elseif (e == E_ARGS)
85player:notify(tostr("Sorry, name too long.  Maximum number of characters in a name:  ", $login.max_player_name));
86elseif (e == 0)
87player:notify("Name and aliases remain unchanged.");
88else
89player:notify(tostr(e));
90endif
91endif
92endif

@addalias*# @add-alias*#

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

Referenced by

none

Source

1"Syntax: @addalias <alias>[,...,<alias>] to <object>";
2"        @addalias <alias>[,...,<alias>] to <object>:<verb>";
3"";
4"The first form is used to add aliases to an object's list of aliases.  You can separate multiple aliases with commas.  The aliases will be checked against the object's current aliases and all aliases not already in the object's list of aliases will be added.";
5"";
6"Example:";
7"Muchkin wants to add new aliases to Rover the Wonder Dog:";
8"  @addalias Dog,Wonder Dog to Rover";
9"Since Rover the Wonder Dog already has the alias \"Dog\" but does not have the alias \"Wonder Dog\", Munchkin sees:";
10"  Rover the Wonder Dog(#4237) already has the alias Dog.";
11"  Alias Wonder Dog added to Rover the Wonder Dog(#4237).";
12"";
13"If the object is a player, spaces will also be assumed to be separations between aliases and each alias will be checked against the Player Name Database to make sure no one else is using it. Any already used aliases will be identified.";
14"";
15"Example:";
16"Munchkin wants to add his nicknames to his own list of aliases:";
17"  @addalias Foobar Davey to me";
18"@Addalias recognizes that Munchkin is trying to add an alias to a valid player and checks the aliases against the Player Name Database.  Unfortunately, DaveTheMan is already using the alias \"Davey\" so Munchkin sees:";
19"  DaveTheMan(#5432) is already using the alias Davey";
20"  Alias Foobar added to Munchkin(#1523).";
21"";
22"The second form of the @addalias command is for use by programmers, to add aliases to a verb they own.  All commas and spaces are assumed to be separations between aliases.";
23if (player != this)
24return;
25endif
26set_task_perms(player);
27bynumber = verb[$] == "#";
28spec = $code_utils:parse_verbref(iobjstr);
29if (spec)
30if (!player.programmer)
31return player:notify(tostr(E_PERM));
32endif
33object = player:my_match_object(spec[1]);
34if (!$command_utils:object_match_failed(object, spec[1]))
35vname = spec[2];
36if (bynumber)
37if ((vname = $code_utils:toint(vname)) == E_TYPE)
38return player:notify("Verb number expected.");
39elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
40return player:notify("Verb number out of range.");
41endif
42endif
43try
44info = verb_info(object, vname);
45old_aliases = $string_utils:explode(info[3]);
46used = {};
47for alias in (new_aliases = $list_utils:remove_duplicates($string_utils:explode(strsub(dobjstr, ",", " "))))
48if (alias in old_aliases)
49used = {@used, alias};
50new_aliases = setremove(new_aliases, alias);
51endif
52endfor
53if (used)
54player:notify(tostr(object.name, "(", object, "):", vname, " already has the alias", (length(used) > 1) ? "es" | "", " ", $string_utils:english_list(used), "."));
55endif
56if (new_aliases)
57info = listset(info, aliases = $string_utils:from_list({@old_aliases, @new_aliases}, " "), 3);
58try
59result = set_verb_info(object, vname, info);
60player:notify(tostr("Alias", (length(new_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(new_aliases), " added to verb ", object.name, "(", object, "):", vname));
61player:notify(tostr("Verbname is now ", object.name, "(", object, "):\"", aliases, "\""));
62except e (ANY)
63player:notify(e[2]);
64endtry
65endif
66except (E_VERBNF)
67player:notify("That object does not define that verb.");
68except e (ANY)
69player:notify(e[2]);
70endtry
71endif
72elseif (bynumber)
73player:notify(tostr(verb, " can only be used with verbs."));
74else
75object = player:my_match_object(iobjstr);
76if (!$command_utils:object_match_failed(object, iobjstr))
77old_aliases = object.aliases;
78used = {};
79for alias in (new_aliases = $list_utils:remove_duplicates($list_utils:map_arg($string_utils, "trim", $string_utils:explode(is_player(object) ? strsub(dobjstr, " ", ",") | dobjstr, ","))))
80if (alias in old_aliases)
81used = {@used, alias};
82new_aliases = setremove(new_aliases, alias);
83elseif (is_player(object) && valid(someone = $player_db:find_exact(alias)))
84player:notify(tostr(someone.name, "(", someone, ") is already using the alias ", alias, "."));
85new_aliases = setremove(new_aliases, alias);
86endif
87endfor
88if (used)
89player:notify(tostr(object.name, "(", object, ") already has the alias", (length(used) > 1) ? "es" | "", " ", $string_utils:english_list(used), "."));
90endif
91if (new_aliases)
92if ((e = object:set_aliases(aliases = {@old_aliases, @new_aliases})) && (object.aliases == aliases))
93player:notify(tostr("Alias", (length(new_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(new_aliases), " added to ", object.name, "(", object, ")."));
94player:notify(tostr("Aliases for ", $string_utils:nn(object), " are now ", $string_utils:from_value(aliases, 1)));
95elseif (e)
96player:notify("That particular name change not allowed (see help @rename or help @addalias).");
97elseif (e == E_INVARG)
98if ($object_utils:has_property(#0, "local"))
99if ($object_utils:has_property($local, "max_player_aliases"))
100max = $local.max_player_aliases;
101player:notify(("You are not allowed more than " + tostr(max)) + " aliases.");
102endif
103else
104player:notify("You are not allowed any more aliases.");
105endif
106elseif (e == E_NACC)
107player:notify("Oops.  You can't update that object's aliases right now; try again in a few minutes.");
108elseif (e == 0)
109player:notify("Aliases not changed as expected!");
110player:notify(tostr("Aliases for ", $string_utils:nn(object), " are now ", $string_utils:from_value(object.aliases, 1)));
111else
112player:notify(tostr(e));
113endif
114endif
115endif
116endif

@rmalias*# @rm-alias*#

Spec any out of/from inside/from anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1"Syntax: @rmalias <alias>[,...,<alias>] from <object>";
2"        @rmalias <alias>[,...,<alias>] from <object>:<verb>";
3"";
4"The first form is used to remove aliases from an object.  If the object is a valid player, space and commas will be assumed to be separations between unwanted aliases.  Otherwise, only commas will be assumed to be separations.";
5"[5/10/93 Nosredna: flushed above is_player feature";
6"Note that @rmalias will not affect the object's name, only its aliases.";
7"";
8"The second form is for use by programmers, to remove aliases from a verb they own.  All spaces and commas are assumed to be separations between unwanted aliases.";
9if (player != this)
10return;
11endif
12set_task_perms(player);
13bynumber = verb[$] == "#";
14spec = $code_utils:parse_verbref(iobjstr);
15if (spec)
16if (!player.programmer)
17player:notify(tostr(E_PERM));
18endif
19object = player:my_match_object(spec[1]);
20if (!$command_utils:object_match_failed(object, spec[1]))
21vname = spec[2];
22if (bynumber)
23if ((vname = $code_utils:toint(vname)) == E_TYPE)
24return player:notify("Verb number expected.");
25elseif ((vname < 1) || `vname > length(verbs(object)) ! E_PERM => 0')
26return player:notify("Verb number out of range.");
27endif
28endif
29try
30info = verb_info(object, vname);
31old_aliases = $string_utils:explode(info[3]);
32not_used = {};
33for alias in (bad_aliases = $list_utils:remove_duplicates($string_utils:explode(strsub(dobjstr, ",", " "))))
34if (!(alias in old_aliases))
35not_used = {@not_used, alias};
36bad_aliases = setremove(bad_aliases, alias);
37else
38old_aliases = setremove(old_aliases, alias);
39endif
40endfor
41if (not_used)
42player:notify(tostr(object.name, "(", object, "):", vname, " does not have the alias", (length(not_used) > 1) ? "es" | "", " ", $string_utils:english_list(not_used), "."));
43endif
44if (bad_aliases && old_aliases)
45info = listset(info, aliases = $string_utils:from_list(old_aliases, " "), 3);
46try
47result = set_verb_info(object, vname, info);
48player:notify(tostr("Alias", (length(bad_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(bad_aliases), " removed from verb ", object.name, "(", object, "):", vname));
49player:notify(tostr("Verbname is now ", object.name, "(", object, "):\"", aliases, "\""));
50except e (ANY)
51player:notify(e[2]);
52endtry
53elseif (!old_aliases)
54player:notify("You have to leave a verb with at least one alias.");
55endif
56except (E_VERBNF)
57player:notify("That object does not define that verb.");
58except e (ANY)
59player:notify(e[2]);
60endtry
61endif
62elseif (bynumber)
63player:notify(tostr(verb, " can only be used with verbs."));
64else
65object = player:my_match_object(iobjstr);
66if (!$command_utils:object_match_failed(object, iobjstr))
67old_aliases = object.aliases;
68not_used = {};
69for alias in (bad_aliases = $list_utils:remove_duplicates($list_utils:map_arg($string_utils, "trim", $string_utils:explode(dobjstr, ","))))
70"removed is_player(object) ? strsub(dobjstr, \" \", \",\") | --Nosredna";
71if (!(alias in old_aliases))
72not_used = {@not_used, alias};
73bad_aliases = setremove(bad_aliases, alias);
74else
75old_aliases = setremove(old_aliases, alias);
76endif
77endfor
78if (not_used)
79player:notify(tostr(object.name, "(", object, ") does not have the alias", (length(not_used) > 1) ? "es" | "", " ", $string_utils:english_list(not_used), "."));
80endif
81if (bad_aliases)
82if (e = object:set_aliases(old_aliases))
83player:notify(tostr("Alias", (length(bad_aliases) > 1) ? "es" | "", " ", $string_utils:english_list(bad_aliases), " removed from ", object.name, "(", object, ")."));
84player:notify(tostr("Aliases for ", object.name, "(", object, ") are now ", $string_utils:from_value(old_aliases, 1)));
85elseif (e == E_INVARG)
86player:notify("That particular name change not allowed (see help @rename or help @rmalias).");
87elseif (e == E_NACC)
88player:notify("Oops.  You can't update that object's aliases right now; try again in a few minutes.");
89elseif (e == 0)
90player:notify("Aliases not changed as expected!");
91player:notify(tostr("Aliases for ", $string_utils:nn(object), " are ", $string_utils:from_value(object.aliases, 1)));
92else
93player:notify(tostr(e));
94endif
95endif
96endif
97endif

@desc*ribe

Spec any as anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(player);
2dobj = player:my_match_object(dobjstr);
3if ($command_utils:object_match_failed(dobj, dobjstr))
4"...lose...";
5elseif (e = dobj:set_description(iobjstr))
6player:notify("Description set.");
7else
8player:notify(tostr(e));
9endif

@mess*ages

Spec any none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(player);
2if (dobjstr == "")
3player:notify(tostr("Usage:  ", verb, " <object>"));
4return;
5endif
6dobj = player:my_match_object(dobjstr);
7if ($command_utils:object_match_failed(dobj, dobjstr))
8return;
9endif
10found_one = 0;
11props = $object_utils:all_properties(dobj);
12if (typeof(props) == ERR)
13player:notify("You can't read the messages on that.");
14return;
15endif
16for pname in (props)
17len = length(pname);
18if ((len > 4) && (pname[len - 3..len] == "_msg"))
19found_one = 1;
20msg = `dobj.(pname) ! ANY';
21if (msg == E_PERM)
22value = "isn't readable by you.";
23elseif (!msg)
24value = "isn't set.";
25elseif (typeof(msg) == LIST)
26value = "is a list.";
27elseif (typeof(msg) != STR)
28value = "is corrupted! **";
29else
30value = "is " + $string_utils:print(msg);
31endif
32player:notify(tostr("@", pname[1..len - 4], " ", dobjstr, " ", value));
33endif
34endfor
35if (!found_one)
36player:notify("That object doesn't have any messages to set.");
37endif

@notedit

Spec any none noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1$note_editor:invoke(dobjstr, verb);

@last-c*onnection

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"@last-c           reports when and from where you last connected.";
2"@last-c all       adds the 10 most recent places you connected from.";
3"@last-c confunc   is like `@last-c' but is silent on first login.";
4opts = {"all", "confunc"};
5i = 0;
6if (caller != this)
7return E_PERM;
8elseif (args && ((length(args) > 1) || (!(i = $string_utils:find_prefix(args[1], opts)))))
9this:notify(tostr("Usage:  ", verb, " [all]"));
10return;
11endif
12opt_all = i && (opts[i] == "all");
13opt_confunc = i && (opts[i] == "confunc");
14if (!(prev = this.previous_connection))
15this:notify("Something was broken when you logged in; tell a wizard.");
16elseif (prev[1] == 0)
17opt_confunc || this:notify("Your previous connection was before we started keeping track.");
18elseif (prev[1] > time())
19this:notify("This is your first time connected.");
20else
21this:notify(tostr("Last connected ", this:ctime(prev[1]), " from ", prev[2]));
22if (opt_all)
23this:notify("Previous connections have been from the following sites:");
24for l in (this.all_connect_places)
25this:notify("   " + l);
26endfor
27endif
28endif

set_gender

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"set_gender(newgender) attempts to change this.gender to newgender";
2"  => E_PERM   if you don't own this or aren't its parent";
3"  => Other return values as from $gender_utils:set.";
4if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
5return E_PERM;
6else
7result = $gender_utils:set(this, args[1]);
8this.gender = (typeof(result) == STR) ? result | args[1];
9return result;
10endif

@gender

Spec any none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(valid(caller_perms()) ? caller_perms() | player);
2if (!args)
3player:notify(tostr("Your gender is currently ", this.gender, "."));
4player:notify($string_utils:pronoun_sub("Your pronouns:  %s,%o,%p,%q,%r,%S,%O,%P,%Q,%R"));
5player:notify(tostr("Available genders:  ", $string_utils:english_list($gender_utils.genders, "", " or ")));
6else
7result = this:set_gender(args[1]);
8quote = (result == E_NONE) ? "\"" | "";
9player:notify(tostr("Gender set to ", quote, this.gender, quote, "."));
10if (typeof(result) != ERR)
11player:notify($string_utils:pronoun_sub("Your pronouns:  %s,%o,%p,%q,%r,%S,%O,%P,%Q,%R"));
12elseif (result != E_NONE)
13player:notify(tostr("Couldn't set pronouns:  ", result));
14else
15player:notify("Pronouns unchanged.");
16endif
17endif

set_brief

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"set_brief(value)";
2"set_brief(value, anything)";
3"If <anything> is given, add value to the current value; otherwise, just set the value.";
4if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
5return E_PERM;
6else
7if (length(args) == 1)
8this.brief = args[1];
9else
10this.brief = this.brief + args[1];
11endif
12endif

@mode

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1"@mode <mode>";
2"Current modes are brief and verbose.";
3"General verb for setting player `modes'.";
4"Modes are coded right here in the verb.";
5if (caller != this)
6player:tell("You can't set someone else's modes.");
7return E_PERM;
8endif
9modes = {"brief", "verbose"};
10mode = modes[$string_utils:find_prefix(dobjstr, modes)];
11if (!mode)
12player:tell("Unknown mode \"", dobjstr, "\".  Known modes:");
13for mode in (modes)
14player:tell("  ", mode);
15endfor
16return 0;
17elseif (mode == "brief")
18this:set_brief(1);
19elseif (mode == "verbose")
20this:set_brief(0);
21endif
22player:tell($string_utils:capitalize(mode), " mode set.");
23return 1;

@exam*ine

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"This verb should probably go away once 'examine' is in place.";
2if (dobjstr == "")
3player:notify(tostr("Usage:  ", verb, " <object>"));
4return;
5endif
6what = $string_utils:match_object(dobjstr, player.location);
7if ($command_utils:object_match_failed(what, dobjstr))
8return;
9endif
10player:notify(tostr(what.name, " (", what, ") is owned by ", valid(what.owner) ? what.owner.name | "a recycled player", " (", what.owner, ")."));
11player:notify(tostr("Aliases:  ", $string_utils:english_list(what.aliases)));
12desc = what:description();
13if (desc)
14player:notify_lines(desc);
15else
16player:notify("(No description set.)");
17endif
18if ($perm_utils:controls(player, what))
19player:notify(tostr("Key:  ", $lock_utils:unparse_key(what.key)));
20endif
21contents = what.contents;
22if (contents)
23player:notify("Contents:");
24for item in (contents)
25player:notify(tostr("  ", item.name, " (", item, ")"));
26endfor
27endif
28"Use dobjstr, not shortest alias.";
29name = dobjstr;
30"name = what.name;";
31"if (typeof(what.aliases) == LIST && what.aliases != {})";
32"for alias in (what.aliases)";
33"if (length(alias) <= length(name))";
34"name = alias;";
35"endif";
36"endfor";
37"endif";
38vrbs = {};
39commands_ok = what in {player, player.location};
40dull_classes = {$root_class, $room, $player, $prog};
41what = what;
42printed_working_msg = 0;
43while (what != $nothing)
44if ($command_utils:running_out_of_time())
45if (!printed_working_msg)
46player:notify("Working on list of obvious verbs...");
47printed_working_msg = 1;
48endif
49suspend(0);
50endif
51if (!(what in dull_classes))
52for i in [1..length(verbs(what))]
53if ($command_utils:running_out_of_time())
54if (!printed_working_msg)
55player:notify("Working on list of obvious verbs...");
56printed_working_msg = 1;
57endif
58suspend(0);
59endif
60info = verb_info(what, i);
61syntax = verb_args(what, i);
62if ((index(info[2], "r") && ((syntax[2..3] != {"none", "this"}) && (commands_ok || ("this" in syntax)))) && verb_code(what, i))
63{dobj, prep, iobj} = syntax;
64if (syntax == {"any", "any", "any"})
65prep = "none";
66endif
67if (prep != "none")
68for x in ($string_utils:explode(prep, "/"))
69if (length(x) <= length(prep))
70prep = x;
71endif
72endfor
73endif
74"This is the correct way to handle verbs ending in *";
75vname = info[3];
76while (j = index(vname, "* "))
77vname = tostr(vname[1..j - 1], "<anything>", vname[j + 1..$]);
78endwhile
79if (vname[$] == "*")
80vname = vname[1..$ - 1] + "<anything>";
81endif
82vname = strsub(vname, " ", "/");
83rest = "";
84if (prep != "none")
85rest = " " + ((prep == "any") ? "<anything>" | prep);
86if (iobj != "none")
87rest = tostr(rest, " ", (iobj == "this") ? name | "<anything>");
88endif
89endif
90if (dobj != "none")
91rest = tostr(" ", (dobj == "this") ? name | "<anything>", rest);
92endif
93vrbs = setadd(vrbs, ("  " + vname) + rest);
94endif
95endfor
96endif
97what = parent(what);
98endwhile
99if (vrbs)
100player:notify("Obvious Verbs:");
101player:notify_lines(vrbs);
102printed_working_msg && player:notify("(End of list.)");
103elseif (printed_working_msg)
104player:notify("No obvious verbs found.");
105endif

exam*ine

Spec any none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1set_task_perms(player);
2if (!dobjstr)
3player:notify(tostr("Usage:  ", verb, " <object>"));
4return E_INVARG;
5endif
6what = player.location:match_object(dobjstr);
7if ($command_utils:object_match_failed(what, dobjstr))
8return;
9endif
10what:do_examine(player);

add_feature

Spec this none thisFlags rxdOwner #36Definer #6

Referenced by

Source

1"Add a feature to this player's features list.  Caller must be this or have suitable permissions (this or wizardly).";
2"If this is a nonprogrammer, then ask feature if it is feature_ok (that is, if it has a verb :feature_ok which returns a true value, or a property .feature_ok which is true).";
3"After adding feature, call feature:feature_add(this).";
4"Returns true if successful, E_INVARG if not a valid object, and E_PERM if !feature_ok or if caller doesn't have permission.";
5if ((caller == this) || $perm_utils:controls(caller_perms(), this))
6feature = args[1];
7if ((typeof(feature) != OBJ) || (!valid(feature)))
8return E_INVARG;
9"Not a valid object.";
10endif
11if ($code_utils:verb_or_property(feature, "feature_ok", this))
12"The object is willing to be a feature.";
13if (typeof(this.features) == LIST)
14"If list, we can simply setadd the feature.";
15this.features = setadd(this.features, feature);
16else
17"If not, we erase the old value and create a new list.";
18this.features = {feature};
19endif
20"Tell the feature it's just been added.";
21try
22feature:feature_add(this);
23except (ANY)
24"just ignore errors.";
25endtry
26return 1;
27"We're done.";
28else
29return E_PERM;
30"Feature isn't feature_ok.";
31endif
32else
33return E_PERM;
34"Caller doesn't have permission.";
35endif

remove_feature

Spec this none thisFlags rxdOwner #36Definer #6

Referenced by

Source

1"Remove a feature from this player's features list.  Caller must be this, or have permissions of this, a wizard, or feature.owner.";
2"Returns true if successful, E_PERM if caller didn't have permission.";
3feature = args[1];
4if (((caller == this) || $perm_utils:controls(caller_perms(), this)) || (caller_perms() == feature.owner))
5if (typeof(this.features) == LIST)
6"If this is a list, we can just setremove...";
7this.features = setremove(this.features, feature);
8"Otherwise, we leave it alone.";
9endif
10"Let the feature know it's been removed.";
11try
12feature:feature_remove(this);
13except (ANY)
14"just ignore errors.";
15endtry
16return 1;
17"We're done.";
18else
19return E_PERM;
20"Caller didn't have permission.";
21endif

@add-feature @addfeature

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

Source

1"Usage:";
2"  @add-feature";
3"  @add-feature <feature object>";
4"Modified 10 Oct 94, by Michele, to check the warehouse and match.";
5"Lists all features or adds an object to your features list.";
6set_task_perms(player);
7if (dobjstr)
8if (dobj == $failed_match)
9dobj = $feature.warehouse:match_object(dobjstr);
10endif
11if (!$command_utils:object_match_failed(dobj, dobjstr))
12if (dobj in player.features)
13player:tell(dobjstr, " is already one of your features.");
14elseif (player:add_feature(dobj))
15player:tell(dobj, " (", dobj.name, ") added as a feature.");
16else
17player:tell("You can't seem to add ", dobj, " (", dobj.name, ") to your features list.");
18endif
19endif
20else
21player:tell("Usage:  @add-feature <object>");
22if (length($feature.warehouse.contents) < 20)
23player:tell("Available features include:");
24player:tell("--------------------------");
25fe = {};
26for c in ($feature.warehouse.contents)
27fe = {(c in player.features) ? c:title() + " (*)" | c:title()};
28player:tell("  " + $string_utils:english_list(fe));
29endfor
30player:tell("--------------------------");
31player:tell("A * after the feature name means that you already have that feature.");
32endif
33endif

@remove-feature @rmfeature

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"Usage:  @remove-feature <feature object>";
2"Remove an object from your .features list.";
3set_task_perms(player);
4if (dobjstr)
5features = player.features;
6if (!valid(dobj))
7dobj = $string_utils:match(dobjstr, features, "name", features, "aliases");
8endif
9if (!$command_utils:object_match_failed(dobj, dobjstr))
10if (dobj in features)
11player:remove_feature(dobj);
12player:tell(dobj, " (", dobj.name, ") removed from your features list.");
13else
14player:tell(dobjstr, " is not one of your features.");
15endif
16endif
17else
18player:tell("Usage:  @remove-feature <object>");
19endif

@features

Spec any for/about anyFlags rxdOwner #2Definer #6

Referenced by

Source

1"Usage:  @features [<name>] for <player>";
2"List the feature objects matching <name> used by <player>.";
3if (!iobjstr)
4player:tell("Usage: @features [<name>] for <player>");
5return;
6elseif ($command_utils:player_match_failed(whose = $string_utils:match_player(iobjstr), iobjstr))
7return;
8endif
9features = {};
10for feature in (whose.features)
11if (!valid(feature))
12whose:remove_feature(feature);
13elseif ((!dobjstr) || ((dobjstr in feature.aliases) || ((pref = $string_utils:find_prefix(dobjstr, feature.aliases)) || (pref == $ambiguous_match))))
14features = listappend(features, feature);
15endif
16endfor
17if (features)
18len = max(length("Feature"), length(tostr(max_object()))) + 1;
19player:tell($string_utils:left("Feature", len), "Name");
20player:tell($string_utils:left("-------", len), "----");
21for feature in (features)
22player:tell($string_utils:left(tostr(feature), len), feature.name);
23endfor
24player:tell($string_utils:left("-------", len), "----");
25cstr = ((tostr(length(features)) + " feature") + ((length(features) > 1) ? "s" | "")) + " found";
26if (whose != this)
27cstr = ((((cstr + " on ") + whose.name) + " (") + tostr(whose)) + ")";
28endif
29if (dobjstr)
30cstr = ((cstr + " matching \"") + dobjstr) + "\"";
31endif
32cstr = cstr + ".";
33player:tell(cstr);
34elseif (dobjstr)
35player:tell("No features found on ", whose.name, " (", whose, ") matching \"", dobjstr, "\".");
36else
37player:tell("No features found on ", whose.name, " (", whose, ").");
38endif

@memory

Spec none none noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1stats = {memory_usage()};
2if (!stats)
3player:notify("Sorry, but no memory-usage statistics are available for this server.");
4return;
5endif
6su = $string_utils;
7player:notify("Block Size   # In Use    # Free    Bytes In Use   Bytes Free");
8player:notify("----------   --------   --------   ------------   ----------");
9nused = nfree = bytesused = bytesfree = 0;
10kilo = 1024;
11meg = kilo * kilo;
12for x in (stats)
13if (x[2..3] != {0, 0})
14bsize = x[1];
15if ((bsize % meg) == 0)
16bsize = tostr(bsize / meg, " M");
17elseif ((bsize % kilo) == 0)
18bsize = tostr(bsize / kilo, " K");
19endif
20bused = x[1] * x[2];
21bfree = x[1] * x[3];
22player:notify(tostr(su:left(bsize, 10), "   ", su:right(su:group_number(x[2]), 8), "   ", su:right(su:group_number(x[3]), 8), "   ", su:right(su:group_number(bused), 12), "   ", su:right(su:group_number(bfree), 10)));
23nused = nused + x[2];
24nfree = nfree + x[3];
25bytesused = bytesused + bused;
26bytesfree = bytesfree + bfree;
27endif
28endfor
29player:notify("");
30player:notify(tostr(su:left("Totals:", 10), "   ", su:right(su:group_number(nused), 8), "   ", su:right(su:group_number(nfree), 8), "   ", su:right(su:group_number(bytesused), 12), "   ", su:right(su:group_number(bytesfree), 10)));
31player:notify("");
32player:notify(tostr("Total Memory Size: ", su:group_number(bytesused + bytesfree), " bytes."));

@version

Spec none none noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1if ($object_utils:has_property($local, "server_hardware"))
2hw = (" on " + $local.server_hardware) + ".";
3else
4hw = ".";
5endif
6player:notify(tostr("The MOO is currently running version ", server_version(), " of the LambdaMOO server code", hw));
7try
8{MOOname, sversion, coretime} = $core_history[1];
9player:notify(tostr("The database was derived from a core created on ", $time_utils:time_sub("$n $t, $Y", coretime), " at ", MOOname, " for version ", sversion, " of the server."));
10except (E_RANGE)
11player:notify("The database was created from scratch.");
12except (ANY)
13player:notify("No information is available on the database version.");
14endtry

@uptime

Spec none none noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1player:notify(tostr("The server has been up for ", $time_utils:english_time(time() - $last_restart_time), "."));

@quit

Spec none none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1boot_player(player);
2"-- argh, let the player decide; #3:disfunc() takes care of this --Rog";
3"player:moveto(player.home)";

examine_commands_ok

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1return this == args[1];

is_listening

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"return true if player is active.";
2return typeof(`idle_seconds(this) ! ANY') != ERR;

moveto

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (args[1] == #-1)
2return E_INVARG;
3this:notify("You are now in #-1, The Void.  Type `home' to get back.");
4endif
5set_task_perms(caller_perms());
6pass(@args);

announce*_all_but

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1return this.location:(verb)(@args);
2"temporarily let player:announce be noisy to player";
3if (verb == "announce_all_but")
4if (this in args[1])
5return;
6endif
7args = args[2..$];
8endif
9this:tell("(from within you) ", @args);

linewrap

Spec this none thisFlags rxdOwner #36Definer #6

Referenced by

none

Source

1"Return a true value if this needs linewrapping.";
2"default is true if .linelen > 0";
3return this.linelen > 0;

@set-note-string @set-note-text

Spec any none noneFlags rdOwner #2Definer #6

Referenced by

none

Source

1"Usage:  @set-note-{string | text} {#xx | #xx.pname}";
2"        ...lines of text...";
3"        .";
4"";
5"For use by clients' local editors, to save new text for a note or object property.  See $note_editor:local_editing_info() for details.";
6set_task_perms(player);
7text = $command_utils:read_lines();
8if ((verb == "@set-note-string") && (length(text) <= 1))
9text = text ? text[1] | "";
10endif
11if (spec = $code_utils:parse_propref(argstr))
12o = toobj(spec[1]);
13p = spec[2];
14if ($object_utils:has_verb(o, vb = "set_" + p) && (typeof(e = o:(vb)(text)) != ERR))
15player:tell("Set ", p, " property of ", o.name, " (", o, ") via :", vb, ".");
16elseif (text != (e = `o.(p) = text ! ANY'))
17player:tell("Error:  ", e);
18else
19player:tell("Set ", p, " property of ", o.name, " (", o, ").");
20endif
21elseif (typeof(note = $code_utils:toobj(argstr)) == OBJ)
22e = note:set_text(text);
23if (typeof(e) == ERR)
24player:tell("Error:  ", e);
25else
26player:tell("Set text of ", note.name, " (", note, ").");
27endif
28else
29player:tell("Error:  Malformed argument to ", verb, ": ", argstr);
30endif

verb_sub

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1text = args[1];
2if (a = `$list_utils:assoc(text, this.verb_subs) ! ANY')
3return a[2];
4else
5return $gender_utils:get_conj(text, this);
6endif

ownership_quota

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1if ($perm_utils:controls(caller_perms(), this))
2return this.(verb);
3else
4return E_PERM;
5endif

tell_lines

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1lines = args[1];
2if (typeof(lines) != LIST)
3lines = {lines};
4endif
5if (this.gaglist || this.paranoid)
6"Check the above first, default case, to save ticks.  Paranoid gaggers are cost an extra three or so ticks by this, probably a net savings.";
7if (this:gag_p())
8return;
9endif
10if (this.paranoid == 2)
11z = this:whodunnit({@callers(), {player, "", player}}, {this, $no_one}, {})[3];
12lines = {((("[start text by " + z.name) + " (") + tostr(z)) + ")]", @lines, ((("[end text by " + z.name) + " (") + tostr(z)) + ")]"};
13elseif (this.paranoid == 1)
14$paranoid_db:add_data(this, {{@callers(), {player, "<cmd-line>", player}}, lines});
15endif
16endif
17"don't gather stats for now: $list_utils:check_nonstring_tell_lines(lines)";
18this:notify_lines(lines);

@lastlog

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"Copied from generic room (#3):@lastlog by Haakon (#2) Wed Dec 30 13:30:02 1992 PST";
2if (dobjstr != "")
3dobj = $string_utils:match_player(dobjstr);
4if (!valid(dobj))
5player:tell("Who?");
6return;
7endif
8folks = {dobj};
9else
10folks = players();
11endif
12day = week = month = ever = never = {};
13a_day = (24 * 60) * 60;
14a_week = 7 * a_day;
15a_month = 30 * a_day;
16now = time();
17for x in (folks)
18when = x.last_connect_time;
19how_long = now - when;
20if ((when == 0) || (when > now))
21never = {@never, x};
22elseif (how_long < a_day)
23day = {@day, x};
24elseif (how_long < a_week)
25week = {@week, x};
26elseif (how_long < a_month)
27month = {@month, x};
28else
29ever = {@ever, x};
30endif
31endfor
32for entry in ({{day, "the last day"}, {week, "the last week"}, {month, "the last 30 days"}, {ever, "recorded history"}})
33if (entry[1])
34player:tell("Players who have connected within ", entry[2], ":");
35for x in (entry[1])
36player:tell("  ", x.name, " last connected ", ctime(x.last_connect_time), ".");
37endfor
38endif
39endfor
40if (never)
41player:tell("Players who have never connected:");
42player:tell("  ", $string_utils:english_list($list_utils:map_prop(never, "name")));
43endif

set_linelength

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1"Set linelength.  Linelength must be an integer >= 10.";
2"If wrap is currently off (i.e. linelength is less than 0), maintains sign.  That is, this function *takes* an absolute value, and coerces the sign to be appropriate.";
3"If you want to override the dwimming of wrap, pass in a second argument.";
4"returns E_PERM if not allowed, E_INVARG if linelength is too low, otherwise the linelength.";
5if ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
6return E_PERM;
7elseif (abs(len = args[1]) < 10)
8return E_INVARG;
9elseif (length(args) > 1)
10this.linelen = len;
11else
12"DWIM here.";
13this.linelen = (this.linelen > 0) ? len | (-len);
14return len;
15endif

set_pagelength

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"Set pagelength. Must be an integer >= 5, or 0 to turn pagelength off.";
2"Returns E_PERM if you shouldn't be doing this, E_INVARG if it's too low, otherwise, what it got set to.";
3if ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
4return E_PERM;
5elseif (((len = args[1]) < 5) && (len != 0))
6return E_INVARG;
7else
8if ((this.pagelen = len) == 0)
9if (lb = this.linebuffer)
10"queued text remains";
11this:notify_lines(lb);
12clear_property(this, "linebuffer");
13endif
14endif
15return len;
16endif

set_home

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"set_home(newhome) attempts to change this.home to newhome";
2"E_TYPE   if newhome doesn't have a callable :accept_for_abode verb.";
3"E_INVARG if newhome won't accept you as a resident.";
4"E_PERM   if you don't own this and aren't its parent.";
5"1        if it works.";
6newhome = args[1];
7if ((caller == this) || $perm_utils:controls(caller_perms(), this))
8if ($object_utils:has_callable_verb(newhome, "accept_for_abode"))
9if (newhome:accept_for_abode(this))
10return (typeof(e = `this.home = args[1] ! ANY') != ERR) || e;
11else
12return E_INVARG;
13endif
14else
15return E_TYPE;
16endif
17else
18return E_PERM;
19endif

@registerme

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1"@registerme as <email-address> -- enter a new email address for player";
2"   will change the database entry, assign a new password, and mail the new password to the player at the given email address.";
3if (player != this)
4return player:notify(tostr(E_PERM));
5endif
6who = this;
7if ($object_utils:isa(this, $guest))
8who:notify("Sorry, guests should use the '@request' command to request a character.");
9return;
10endif
11connection = $string_utils:connection_hostname(connection_name(who));
12if (!argstr)
13if (who.email_address)
14player:tell("You are currently registered as:  ", who.email_address);
15else
16player:tell("You are not currently registered.");
17endif
18player:tell("Use @registerme as <address> to change this.");
19return;
20elseif (((prepstr != "as") || (!iobjstr)) || dobjstr)
21player:tell("Usage: @registerme as <address>");
22return;
23endif
24email = iobjstr;
25if (email == this.email_address)
26who:notify("That is your current address.  Not changed.");
27return;
28elseif (reason = $wiz_utils:check_reregistration(this, email, connection))
29if (reason[1] == "-")
30if (!$command_utils:yes_or_no(reason[2..$] + ". Automatic registration not allowed. Ask to be registered at this address anyway?"))
31who:notify("Okay.");
32return;
33endif
34else
35return who:notify(tostr(reason, " Please try again."));
36endif
37endif
38if ($network.active && (!reason))
39if (!$command_utils:yes_or_no(tostr("If you continue, your password will be changed, the new password mailed to `", email, "'. Do you want to continue?")))
40return who:notify("Registration terminated.");
41endif
42password = $wiz_utils:random_password(5);
43old = who.email_address || "[ unregistered ]";
44who:notify(tostr("Registering you, and changing your password and mailing new one to ", email, "."));
45result = $network:sendmail(email, tostr("Your ", $network.MOO_Name, " character, ", who.name), "Reply-to: " + $login.registration_address, @$generic_editor:fill_string(tostr("Your ", $network.MOO_name, " character, ", $string_utils:nn(who), " has been registered to this email address (", email, "), and a new password assigned.  The new password is `", password, "'. Please keep your password secure. You can change your password with the @password command."), 75));
46if (result != 0)
47who:notify(tostr("Mail sending did not work: ", reason, ". Reregistration terminated."));
48return;
49endif
50who:notify(tostr("Mail with your new password forwarded. If you do not get it, send regular email to ", $login.registration_address, " with your character name."));
51$mail_agent:send_message($new_player_log, $new_player_log, "reg " + $string_utils:nn(this), {email, tostr("formerly ", old)});
52$registration_db:add(this, email, "Reregistered at " + ctime());
53this.email_address = email;
54who.password = crypt(password);
55who.last_password_time = time();
56else
57who:notify("No automatic reregistration: your request will be forwarded.");
58if (typeof(curreg = $registration_db:find(email)) == LIST)
59additional_info = {"Current registration information for this email address:", @$registration_db:describe_registration(curreg)};
60else
61additional_info = {};
62endif
63$mail_agent:send_message(this, $registration_db.registrar, "Registration request", {((("Reregistration request from " + $string_utils:nn(who)) + " connected via ") + connection) + ":", "", (("@register " + who.name) + " ") + email, ("@new-password " + who.name) + " is ", "", "Reason this request was forwarded:", reason, @additional_info});
64endif

ctime

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1":ctime([INT time]) => STR as the function.";
2"May be hacked by players and player-classes to reflect differences in time-zone.";
3return ctime(@args);

@age

Spec any none noneFlags rdOwner #36Definer #6

Referenced by

none

Source

1if ((dobjstr == "") || (dobj == player))
2dobj = player;
3else
4dobj = $string_utils:match_player(dobjstr);
5if (!valid(dobj))
6$command_utils:player_match_failed(dobj, dobjstr);
7return;
8endif
9endif
10time = dobj.first_connect_time;
11if (time == $maxint)
12duration = time() - dobj.last_disconnect_time;
13if (duration < 86400)
14notice = $string_utils:from_seconds(duration);
15else
16notice = $time_utils:english_time((duration / 86400) * 86400);
17endif
18player:notify(tostr(dobj.name, " has never connected.  It was created ", notice, " ago."));
19elseif (time == 0)
20player:notify(tostr(dobj.name, " first connected before initial connections were being recorded."));
21else
22player:notify(tostr(dobj.name, " first connected on ", ctime(time)));
23duration = time() - time;
24if (duration < 86400)
25notice = $string_utils:from_seconds(duration);
26else
27notice = $time_utils:english_time((duration / 86400) * 86400);
28endif
29player:notify(tostr($string_utils:pronoun_sub("%S %<is> ", dobj), notice, " old."));
30endif

news

Spec any none noneFlags rxdOwner #2Definer #6

Referenced by

none

Source

1"Usage: news [contents] [articles]";
2"";
3"Common uses:";
4"news           -- display all current news, or as @mail-options decree";
5"news new       -- display articles you haven't seen yet";
6"news all       -- display all current news";
7"news contents  -- display headers of current news";
8"news <article> -- display article";
9"news archive   -- display news which has been marked as archived.";
10set_task_perms(player);
11cur = this:get_current_message($news) || {0, 0};
12arch = 0;
13if (((!args) && (o = player:mail_option("news"))) && (o != "all"))
14"no arguments, use the player's default";
15args = {o};
16elseif (args == {"all"})
17args = {};
18elseif (args == {"archive"})
19arch = 1;
20args = {};
21endif
22if (hdrs_only = args && (args[1] == "contents"))
23"Do the mail contents list";
24args[1..1] = {};
25endif
26if (args)
27if (typeof(seq = $news:_parse(args, @cur)) == STR)
28player:notify(seq);
29return;
30elseif (seq = $seq_utils:intersection(seq, $news.current_news))
31else
32player:notify((args == {"new"}) ? "No new news." | "None of those are current articles.");
33return;
34endif
35elseif (arch && (seq = $news.archive_news))
36"yduJ hates this coding style.  Just so you know.";
37elseif (seq = $news.current_news)
38else
39player:notify("No news");
40return;
41endif
42if (hdrs_only)
43$news:display_seq_headers(seq, @cur);
44else
45player:set_current_message($news, @$news:news_display_seq_full(seq));
46endif

@edit

Spec any any anyFlags rdOwner #36Definer #6

Referenced by

none

Source

1"Calls the verb editor on verbs, the note editor on properties, and on anything else assumes it's an object for which you want to edit the .description.";
2if (!args)
3((player in $note_editor.active) ? $note_editor | $verb_editor):invoke(dobjstr, verb);
4elseif ($code_utils:parse_verbref(args[1]))
5if (player.programmer)
6$verb_editor:invoke(argstr, verb);
7else
8player:notify("You need to be a programmer to do this.");
9player:notify("If you want to become a programmer, talk to a wizard.");
10return;
11endif
12else
13$note_editor:invoke(dobjstr, verb);
14endif

erase_paranoid_data

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
2return E_PERM;
3else
4$paranoid_db:erase_data(this);
5endif

@move-new

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1"'@move <object> to <place>' - Teleport an object. Example: '@move trash to #11' to move trash to the closet.";
2set_task_perms((caller == this) ? this | $no_one);
3if ((prepstr != "to") || (!iobjstr))
4player:tell("Usage: @move <object> to <location>");
5return;
6endif
7if ((!dobjstr) || (dobjstr == "me"))
8dobj = this;
9else
10dobj = here:match_object(dobjstr);
11if (!valid(dobj))
12dobj = player:my_match_object(dobjstr);
13endif
14endif
15if ($command_utils:object_match_failed(dobj, dobjstr))
16return;
17endif
18iobj = this:lookup_room(iobjstr);
19if ((iobj != $nothing) && $command_utils:object_match_failed(iobj, iobjstr))
20return;
21endif
22if (((!player.programmer) && (!$perm_utils:controls(this, dobj))) && (this != dobj))
23player:tell("You may only @move your own things.");
24return;
25endif
26this:teleport(dobj, iobj);

notify_lines_suspended

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1if (($perm_utils:controls(caller_perms(), this) || (caller == this)) || (caller_perms() == this))
2set_task_perms(caller_perms());
3for line in ((typeof(lines = args[1]) != LIST) ? {lines} | lines)
4(ticks_left() < 4000) && suspend(0);
5this:notify(tostr(line));
6endfor
7else
8return E_PERM;
9endif

_chparent

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1set_task_perms(caller_perms());
2return chparent(@args);

@users

Spec none none noneFlags rxdOwner #36Definer #6

Referenced by

none

Source

1"Prints a count and compact list of the currently-connected players.";
2cp = connected_players();
3linelen = abs(player.linelen) || 79;
4player:tell_lines({tostr("There are ", length(cp), " players connected:"), @$generic_editor:fill_string($string_utils:english_list($list_utils:sort_suspended(0, $list_utils:map_prop(cp, "name"))), linelen)});

@password

Spec any any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1if (typeof(player.password) != STR)
2if (length(args) != 1)
3return player:notify(tostr("Usage:  ", verb, " <new-password>"));
4else
5new_password = args[1];
6endif
7elseif (length(args) != 2)
8player:notify(tostr("Usage:  ", verb, " <old-password> <new-password>"));
9return;
10elseif (player.password != crypt(tostr(args[1]), player.password))
11player:notify("That's not your old password.");
12return;
13elseif (is_clear_property(player, "password"))
14player:notify("Your password has a `clear' property.  Please refer to a wizard for assistance in changing it.");
15return;
16else
17new_password = args[2];
18endif
19if (r = $password_verifier:reject_password(new_password, player))
20player:notify(r);
21return;
22endif
23player.password = crypt(tostr(new_password));
24player.last_password_time = time();
25player:notify("New password set.");

recycle

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

none

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2pass(@args);
3features = this.features;
4"Have to do this, or :feature_remove thinks you're a liar and doesn't believe.";
5this.features = {};
6for x in (features)
7try
8x:feature_remove(this);
9except (ANY)
10"Ignore errors";
11endtry
12endfor
13endif

gc_gaglist

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1((caller == this) || $perm_utils:controls(caller_perms(), this)) || raise(E_PERM);
2if (g = this.gaglist)
3recycler = $recycler;
4for o in (g)
5if (!recycler:valid(o))
6g = setremove(g, o);
7endif
8endfor
9this.gaglist = g;
10endif

@ping @idle

Spec none any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1"This verb is for people who get idle connections dropped at irritating frequencies of 15 minutes or less. It will not continue past a 1000 second idle.";
2"@ping/@idle                              => connection check every 4 minutes.";
3"@ping/@idle with noise/info/report/trace => reports ip data.";
4"";
5"@unping/@unidle to stop the insanity.";
6this.ping_task[2] = (iobjstr in {"noise", "report", "info", "trace"}) ? 1 | 0;
7(!$scheduler:valid_task(this.ping_task[1])) && this:_ping();
8this:notify("You will be pinged every 4 minutes.");

_ping

Spec this none thisFlags rxdOwner #2Definer #6

Referenced by

Source

1if (caller in {this, $scheduler})
2this.ping_task[2] ? this:notify(connection_name(this)) | this:notify("");
3if (((this in connected_players()) && (!$scheduler:valid_task(this.ping_task[1]))) && (idle_seconds(this) < 1000))
4this.ping_task[1] = $scheduler:schedule(240, this, "_ping", {this.ping_task[2]});
5else
6this.ping_task = {0, 0};
7endif
8else
9player:tell($string_utils:nn(caller), " is not valid.");
10endif

@unping @unidle

Spec none any anyFlags rdOwner #2Definer #6

Referenced by

none

Source

1($scheduler:valid_task(this.ping_task[1]) && $scheduler:kill_task({this.ping_task[1]})) && player:notify("Glad you're back. :-)");