Frand's administrator class #90

Parent #91Owner #36Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: Frand's administrator class, Frand's player class, player class

74 verbs · 118 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
@roomsnone none nonerxd#906
names_ofthis none thisrxd#902
@goany none nonerxd#9010
lookup_roomthis none thisrxd#9023
teleportthis none thisrxd#9037
teleport_messagesthis none thisrxd#9018
@moveany any anyrxd#9027
index_roomthis none thisrxd#9015
@addr*oomany none nonerxd#9023
@rmr*oomany none nonerxd#9014
@joinany none nonerxd#9036
@findany none nonerxd#9025
find_verbthis none thisrxd#9018
@waysany none nonerxd#9017
findexitsthis none thisrxd#9010
checkexitsthis none thisrxd#909
self_port_msg player_port_msg thing_port_msg join_msgthis none thisrxd#906
oself_port_msg self_arrive_msg oplayer_port_msg player_arrive_msg victim_port_msg othing_port_msg thing_arrive_msg object_port_msgthis none thisrxd#909
msg_subthis none thisrxd#905
obvious_exitsthis none thisrxd#902
tell_waysthis none thisrxd#907
tell_objthis none thisrxd#903
parse_out_objectthis none thisrxd#9035
enlistthis none thisrxd#909
@atany any anyrxd#902
at_playersthis none thisrxd#902
do_at_allthis none thisrxd#9018
do_atthis none thisrxd#909
print_at_itemsthis none thisrxd#906
at_itemthis none thisrxd#9031
internal_atthis none thisrxd#9026
confuncthis none thisrxd#9015
disfuncthis none thisrxd#9016
find_propertythis none thisrxd#9022
find_verbs_onthis none thisrxd#902
find_properties_onthis none thisrxd#902
property_inherited_fromthis none thisrxd#9012
@ref*useany any anyrd#9015
@unref*use @allowany any anyrd#9030
@refusalsnone any anyrd#9015
@refusal-r*eportingany any anyrd#9014
parse_refuse_argumentsthis none thisrxd#9045
time_word_to_secondsthis none thisrxd#902
parse_time_lengththis none thisrxd#9010
parse_timethis none thisrxd#9014
clear_refusalsthis none thisrxd#908
set_default_refusal_timethis none thisrxd#905
refusable_actionsthis none thisrxd#902
translate_refusal_synonymthis none thisrxd#906
default_refusals_text_filterthis none thisrxd#902
refusals_textthis none thisrxd#9020
player_to_refusal_originthis none thisrxd#907
refusal_origin_to_namethis none thisrxd#9011
check_refusal_actionsthis none thisrxd#909
add_refusalthis none thisrxd#9034
remove_refusalthis none thisrxd#9026
remove_expired_refusalsthis none thisrxd#9011
refuses_actionthis none thisrxd#9015
refuses_action_*this none thisrxd#9011
report_refusalthis none thisrxd#904
wh*isperany at/to thisrxd#907
receive_pagethis none thisrxd#907
page_echo_msgthis none thisrxd#907
moveto acceptablethis none thisrxd#9025
receive_messagethis none thisrxd#908
whisper_refused_msg page_refused_msg mail_refused_msgthis none thisrxd#902
last_huhthis none thisrxd#9012
ping_featuresthis none thisrxd#9010
set_owned_objectsthis none thisrxd#9021
init_for_corethis none thisrxd#908
@stats @score @points @statusany none nonerd#9016
@awardany at/to anyrd#9028
@sanctuariesnone none nonerd#9010
whoisany any anyrd#9075

Properties

PropertyDefinerFlagsOwnerValue
at_room_width#90rc#3630
at_number#90rc#360
join_msg#90rc#36"You join %n."
object_port_msg#90rc#36"teleports you."
victim_port_msg#90rc#36"teleports you."
thing_arrive_msg#90rc#36"%T teleports %n in."
othing_port_msg#90rc#36"%T teleports %n out."
thing_port_msg#90rc#36"You teleport %n."
player_arrive_msg#90rc#36"%T teleports %n in."
oplayer_port_msg#90rc#36"%T teleports %n out."
player_port_msg#90rc#36"You teleport %n."
self_arrive_msg#90rc#36"%<teleports> in."
oself_port_msg#90rc#36"%<teleports> out."
self_port_msg#90rc#36""
rooms#90r#36{}
refused_origins#90r#36{}
refused_extra#90r#36{}
default_refusal_time#90r#36604800
report_refusal#90r#360
refused_actions#90r#36{}
refused_until#90r#36{}
page_refused#90r#360
page_refused_msg#90rc#36"%N refuses your page."
whisper_refused_msg#90rc#36"%N refuses your whisper."
mail_refused_msg#90rc#36"%N refuses your mail."
death_msg#91rc#36<clear>
alive#91r#36<clear>
alert#91r#36<clear>
mobile#91r#36<clear>
wielded#91r#36<clear>
last_paged#91r#36<clear>
last_healed#91r#36<clear>
followed_by#91r#36<clear>
following#91r#36<clear>
free_points#91r#361.35999999999999
stats#91r#36<clear>
stats_current#91r#36<clear>
skills#91r#36<clear>
race#91r#36<clear>
org#91r#36<clear>
money#91r#36<clear>
follow_msg#91rc#36<clear>
stopfollow_msg#91rc#36<clear>
searching#91r#36<clear>
languages#91r#36{{#142}, {2.0}}
speaking#91r#36<clear>
remembered_names#91r#36{}
short_desc_msg#91r#36""
_mail_task#40rc#36<clear>
messages_going#40c#36<clear>
mail_lists#40rc#36<clear>
mail_notify#40rc#36<clear>
mail_forward#40rc#36<clear>
mail_options#40rc#36{}
message_keep_date#40rc#36<clear>
messages_kept#40rc#36<clear>
current_message#40c#36{0, -1300000000}
messages#40c#36<clear>
ansi_options#95r#36<clear>
replace_codes#95r#36<clear>
features#6r#36<clear>
previous_connection#6#2<clear>
email_address#6#2<clear>
last_disconnect_time#6r#2<clear>
help#6rc#36#139
more_msg#6rc#36<clear>
linetask#6r#36<clear>
linesleft#6r#36<clear>
linebuffer#6#36<clear>
pagelen#6r#36<clear>
owned_objects#6r#2<clear>
linelen#6r#36<clear>
current_folder#6c#36<clear>
all_connect_places#6#2<clear>
last_connect_place#6#2<clear>
brief#6rc#36<clear>
lines#6c#36<clear>
page_absent_msg#6rc#36<clear>
pq#6rc#36<clear>
pqc#6rc#36<clear>
page_origin_msg#6rc#36<clear>
page_echo_msg#6rc#36<clear>
edit_options#6rc#36<clear>
last_connect_time#6r#2<clear>
ownership_quota#6#36<clear>
gender#6rc#36<clear>
prc#6rc#36<clear>
ppc#6rc#36<clear>
poc#6rc#36<clear>
psc#6rc#36<clear>
pr#6rc#36<clear>
pp#6rc#36<clear>
po#6rc#36<clear>
ps#6rc#36<clear>
home#6rc#36#62
password#6#2<clear>
gaglist#6rc#36<clear>
paranoid#6rc#36<clear>
display_options#6rc#36<clear>
verb_subs#6rc#36<clear>
first_connect_time#6r#2<clear>
size_quota#6#36{50000, 0, 0, 1}
last_password_time#6#2<clear>
last_connect_attempt#6#2<clear>
page_count_start_time#6r#2<clear>
ping_task#6r#36<clear>
value_base#102r#2<clear>
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#36<clear>
key#1c#36<clear>
aliases#1r#2{"Frand's administrator class", "Frand's player class", "player class"}
description#1rc#36"You see a player who should type '@describe me as ...'."
object_size#1r#36{68919, -1090650497}
html#1rc#36<clear>

Ancestry

Ancestors (nearest first): #91 generic gamer#40 Generic Mail Receiving Player#95 ANSI PC#6 generic player#102 subthing#1 Root Class

Children: #4 generic builder

Call graph

calls n90_0 #90:@rooms n6_18 #6:tell n90_0->n6_18 n90_1 #90:names_of n20_7 #20:names_of n90_1->n20_7 n90_2 #90:@go n90_2->n6_18 n90_3 #90:lookup_room n90_2->n90_3 n90_4 #90:teleport n90_2->n90_4 n90_7 #90:index_room n90_3->n90_7 n91_42 #91:my_match_object n90_3->n91_42 n52_6 #52:ancestors n90_3->n52_6 n90_4->n6_18 n90_5 #90:teleport_messages n90_4->n90_5 n90_16 #90:self_port_msg n90_4->n90_16 n90_17 #90:oself_port_msg n90_4->n90_17 n52_8 #52:contains n90_4->n52_8 n52_0 #52:has_property n90_4->n52_0 n90_5->n6_18 n90_18 #90:msg_sub n90_16->n90_18 n90_17->n90_18 n90_6 #90:@move n90_6->n6_18 n90_6->n90_3 n90_6->n90_4 n52_3 #52:has_callable_verb n90_6->n52_3 n6_7 #6:my_match_object n90_6->n6_7 n56_0 #56:object_match_failed n90_6->n56_0 n90_8 #90:@addr*oom n90_8->n6_18 n90_22 #90:parse_out_object n90_8->n90_22 n20_39 #20:words n90_22->n20_39 n20_5 #20:from_list n90_22->n20_5 n90_9 #90:@rmr*oom n90_9->n6_18 n90_9->n90_7 n90_10 #90:@join n90_10->n6_18 n90_10->n90_4 n90_10->n90_16 n20_20 #20:match_player n90_10->n20_20 n56_1 #56:player_match_result n90_10->n56_1 n90_23 #90:enlist n90_10->n90_23 n52_5 #52:isa n90_10->n52_5 n6_79 #6:tell_lines n90_10->n6_79 n20_34 #20:pronoun_sub n90_10->n20_34 n90_11 #90:@find n90_11->n6_18 n90_11->n20_20 n90_11->n56_1 n90_12 #90:find_verb n90_11->n90_12 n90_33 #90:find_property n90_11->n90_33 n55_7 #55:remove_duplicates n90_12->n55_7 n90_34 #90:find_verbs_on n90_12->n90_34 n52_2 #52:has_verb n90_12->n52_2 n91_25 #91:tell n90_12->n91_25 n90_33->n52_0 n90_33->n55_7 n90_33->n91_25 n90_13 #90:@ways n90_13->n6_18 n90_13->n52_6 n90_13->n52_2 n90_15 #90:checkexits n90_13->n90_15 n90_19 #90:obvious_exits n90_13->n90_19 n90_14 #90:findexits n90_13->n90_14 n90_20 #90:tell_ways n90_13->n90_20 n90_20->n6_18 n20_6 #20:english_list n90_20->n20_6 n90_18->n20_34 n20_36 #20:pronoun_quote n90_18->n20_36 n90_24 #90:@at n90_30 #90:internal_at n90_24->n90_30 n90_30->n6_18 n90_30->n90_3 n90_30->n20_20 n90_30->n52_5

Showing 48 of 129 verbs; 81 not shown.

Source

@rooms

Spec none none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@rooms' - List the rooms which are known by name.";
2line = "";
3for item in (this.rooms)
4line = (((line + item[1]) + "(") + tostr(item[2])) + ")   ";
5endfor
6player:tell(line);

names_of

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"Return a string giving the names of the objects in a list. Now on $string_utils";
2return $string_utils:names_of(@args);

@go

Spec any none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@go <place>' - Teleport yourself somewhere. Example: '@go liv' to go to the living room.";
2dest = this:lookup_room(dobjstr);
3if (dest == $failed_match)
4player:tell("There's no such place known.");
5else
6this:teleport(player, dest);
7endif
8if (`dest.room_type == 2 ! E_PROPNF => 0')
9dest:random_exit(this);
10endif

lookup_room

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"Look up a room in your personal database of room names, returning its object number. If it's not in your database, it checks to see if it's a number or a nearby object.";
2room = args[1];
3if (room == "home")
4return player.home;
5elseif (room == "me")
6return player;
7elseif (room == "here")
8return player.location;
9elseif (!room)
10return $failed_match;
11endif
12index = this:index_room(room);
13if (index)
14return this.rooms[index][2];
15else
16return this:my_match_object(room);
17"old code no longer used, 2/11/96 Heathcliff";
18source = player.location;
19if (!(valid(source) && ($room in $object_utils:ancestors(source))))
20source = $room;
21endif
22return source:match_object(room);
23endif

teleport

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"Teleport a player or object. For printing messages, there are three cases: (1) teleport self (2) teleport other player (3) teleport object. There's a spot of complexity for handling the invalid location #-1.";
2{thing, dest} = args;
3source = thing.location;
4if (valid(dest))
5dest_name = dest.name;
6else
7dest_name = tostr(dest);
8endif
9if (source == dest)
10player:tell(thing.name, " is already at ", dest_name, ".");
11return;
12endif
13thing:moveto(dest);
14if (thing.location == dest)
15tsd = {thing, source, dest};
16if (thing == player)
17this:teleport_messages(@tsd, this:self_port_msg(@tsd), this:oself_port_msg(@tsd), this:self_arrive_msg(@tsd), "");
18elseif (is_player(thing))
19this:teleport_messages(@tsd, this:player_port_msg(@tsd), this:oplayer_port_msg(@tsd), this:player_arrive_msg(@tsd), this:victim_port_msg(@tsd));
20else
21this:teleport_messages(@tsd, this:thing_port_msg(@tsd), this:othing_port_msg(@tsd), this:thing_arrive_msg(@tsd), this:object_port_msg(@tsd));
22endif
23elseif (thing.location == source)
24if ($object_utils:contains(thing, dest))
25player:tell("Ooh, it's all twisty. ", dest_name, " is inside ", thing.name, ".");
26else
27if ($object_utils:has_property(thing, "po"))
28pronoun = thing.po;
29else
30pronoun = "it";
31endif
32player:tell("Either ", thing.name, " doesn't want to go, or ", dest_name, " didn't accept ", pronoun, ".");
33endif
34else
35thing_name = (thing == player) ? "you" | thing.name;
36player:tell("A strange force deflects ", thing_name, " from the destination.");
37endif

teleport_messages

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"Send teleport messages. There's a slight complication in that the source and dest need not be valid objects.";
2{thing, source, dest, pmsg, smsg, dmsg, tmsg} = args;
3if (pmsg)
4"The player's own message.";
5player:tell(pmsg);
6endif
7if (smsg && valid(source))
8"A message to the victim's original location, if it is a room.";
9`source:announce_all_but({thing, player}, smsg) ! E_VERBNF => ""';
10endif
11if (dmsg && valid(dest))
12"A message to the destination, if it is a room.";
13`dest:announce_all_but({thing, player}, dmsg) ! E_VERBNF => ""';
14endif
15if (tmsg)
16"A message to the victim being teleported.";
17thing:tell(tmsg);
18endif

@move

Spec any any anyFlags rxdOwner #36Definer #90

Referenced by

none

Source

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

index_room

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'index_room (<room name>)' - Look up a room in your personal database of room names, returning its index in the list. Return 0 if it is not in the list. If the room name is the empty string, then only exact matches are considered; otherwise, a leading match is good enough.";
2room = tostr(args[1]);
3size = length(room);
4index = 1;
5match = 0;
6for item in (this.rooms)
7item_name = item[1];
8if (room == item_name)
9return index;
10elseif ((size && (length(item_name) >= size)) && (room == item_name[1..size]))
11match = index;
12endif
13index = index + 1;
14endfor
15return match;

@addr*oom

Spec any none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@addroom <name> <object>', '@addroom <object> <name>', '@addroom <name>', '@addroom <object>', '@addroom' - Add a room to your personal database of teleport destinations. Example: '@addroom Kitchen #24'. Reasonable <object>s are numbers (#17) and 'here'. If you leave out <object>, the object is the current room. If you leave out <name>, the name is the specified room's name. If you leave out both, you get the current room and its name.";
2if (((!caller) && (player != this)) || (caller && (callers()[1][3] != this)))
3if (!caller)
4player:tell(E_PERM);
5endif
6return E_PERM;
7endif
8if (!dobjstr)
9object = this.location;
10name = valid(object) ? object.name | "Nowhere";
11elseif (command = this:parse_out_object(dobjstr))
12name = command[1];
13object = command[2];
14else
15name = dobjstr;
16object = this.location;
17endif
18if (!valid(object))
19player:tell("This is not a valid location.");
20return E_INVARG;
21endif
22player:tell("Adding ", name, "(", tostr(object), ") to your database of rooms.");
23this.rooms = {@this.rooms, {name, object}};

@rmr*oom

Spec any none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@rmroom <roomname>' - Remove a room from your personal database of teleport destinations. Example: '@rmroom library'.";
2if (((!caller) && (player != this)) || (caller && (callers()[1][3] != this)))
3if (!caller)
4player:tell(E_PERM);
5endif
6return E_PERM;
7endif
8index = this:index_room(dobjstr);
9if (index)
10player:tell("Removing ", this.rooms[index][1], "(", this.rooms[index][2], ").");
11this.rooms = listdelete(this.rooms, index);
12else
13player:tell("That room is not in your database of rooms. Check '@rooms'.");
14endif

@join

Spec any none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@join <player>' - Teleport yourself to the location of any player, whether connected or not.";
2if (dobjstr == "")
3player:tell("Usage: @join <player>. For example, '@join frand'.");
4return;
5endif
6target = $string_utils:match_player(dobjstr);
7$command_utils:player_match_result(target, dobjstr);
8if (valid(target))
9if (target == this)
10if (player == this)
11player:tell("There is little need to join yourself, unless you are split up.");
12else
13player:tell("No thank you. Please get your own join verb.");
14endif
15return;
16endif
17dest = target.location;
18msg = this:enlist(this:join_msg());
19editing = $object_utils:isa(dest, $generic_editor);
20if (editing)
21dest = dest.original[target in dest.active];
22editing_msg = "%N is editing at the moment. You can wait here until %s is done.";
23if (player.location == dest)
24msg = {editing_msg};
25else
26msg = {@msg, editing_msg};
27endif
28endif
29if (msg && ((player.location != dest) || editing))
30player:tell_lines($string_utils:pronoun_sub(msg, target));
31elseif ((`this.x_loc = target.x_loc ! ANY => 1' && `this.y_loc = target.y_loc ! ANY => 1') && (player.location == dest))
32player:tell("OK, you're there.");
33return;
34endif
35this:teleport(player, dest);
36endif

@find

Spec any none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@find #<object>', '@find <player>', '@find :<verb>' '@find .<property>' - Attempt to locate things. Verbs and properties are found on any object in the player's vicinity, and some other places.";
2if (!dobjstr)
3player:tell("Usage: '@find #<object>' or '@find <player>' or '@find :<verb>' or '@find .<property>'.");
4return;
5endif
6if (dobjstr[1] == ":")
7name = dobjstr[2..$];
8this:find_verb(name);
9return;
10elseif (dobjstr[1] == ".")
11name = dobjstr[2..$];
12this:find_property(name);
13return;
14elseif (dobjstr[1] == "#")
15target = toobj(dobjstr);
16if (!valid(target))
17player:tell(target, " does not exist.");
18endif
19else
20target = $string_utils:match_player(dobjstr);
21$command_utils:player_match_result(target, dobjstr);
22endif
23if (valid(target))
24player:tell(target.name, " (", target, ") is at ", valid(target.location) ? target.location.name | "Nowhere", " (", target.location, ").");
25endif

find_verb

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'find_verb (<name>)' - Search for a verb with the given name. The objects searched are those returned by this:find_verbs_on(). The printing order relies on $list_utils:remove_duplicates to leave the *first* copy of each duplicated element in a list; for example, {1, 2, 1} -> {1, 2}, not to {2, 1}.";
2name = args[1];
3results = "";
4objects = $list_utils:remove_duplicates(this:find_verbs_on());
5for thing in (objects)
6if (valid(thing) && (mom = $object_utils:has_verb(thing, name)))
7results = ((((results + "   ") + thing.name) + "(") + tostr(thing)) + ")";
8mom = mom[1];
9if (thing != mom)
10results = ((((results + "--") + mom.name) + "(") + tostr(mom)) + ")";
11endif
12endif
13endfor
14if (results)
15this:tell("The verb :", name, " is on", results);
16else
17this:tell("The verb :", name, " is nowhere to be found.");
18endif

@ways

Spec any none noneFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@ways', '@ways <room>' - List any obvious exits from the given room (or this room, if none is given).";
2if (dobjstr)
3room = dobj;
4else
5room = this.location;
6endif
7if ((!valid(room)) || (!($room in $object_utils:ancestors(room))))
8player:tell("You can only pry into the exits of a room.");
9return;
10endif
11exits = {};
12if ($object_utils:has_verb(room, "obvious_exits"))
13exits = room:obvious_exits();
14endif
15exits = this:checkexits(this:obvious_exits(), room, exits);
16exits = this:findexits(room, exits);
17this:tell_ways(exits, room);

findexits

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"Add to the 'exits' list any exits in the room which have a single-letter alias.";
2{room, exits} = args;
3alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
4for i in [1..length(alphabet)]
5found = room:match_exit(alphabet[i]);
6if (valid(found) && (!(found in exits)))
7exits = {@exits, found};
8endif
9endfor
10return exits;

checkexits

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"Check a list of exits to see if any of them are in the given room.";
2{to_check, room, exits} = args;
3for word in (to_check)
4found = room:match_exit(word);
5if (valid(found) && (!(found in exits)))
6exits = {@exits, found};
7endif
8endfor
9return exits;

self_port_msg player_port_msg thing_port_msg join_msg

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"This verb returns messages that go only to you. You don't need to have your name tacked on to the beginning of these. Heh.";
2msg = this.(verb);
3if (msg && (length(args) >= 3))
4msg = this:msg_sub(msg, @args);
5endif
6return msg;

oself_port_msg self_arrive_msg oplayer_port_msg player_arrive_msg victim_port_msg othing_port_msg thing_arrive_msg object_port_msg

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"This verb returns messages that go to other players. It does pronoun substitutions; if your name is not included in the final string, it adds the name in front.";
2msg = this.(verb);
3if (msg && (length(args) >= 3))
4msg = this:msg_sub(msg, @args);
5endif
6if (msg && (!$string_utils:index_delimited(msg, player.name)))
7msg = (player.name + " ") + msg;
8endif
9return msg;

msg_sub

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"Do pronoun and other substitutions on the teleport messages. The arguments are: 1. The original message, before any substitutions; 2. object being teleported; 3. from location; 4. to location. The return value is the final message.";
2{msg, thing, from, to} = args;
3msg = $string_utils:substitute(msg, $string_utils:pronoun_quote({{"%<from room>", valid(from) ? from.name | "Nowhere"}, {"%<to room>", valid(to) ? to.name | "Nowhere"}}));
4msg = $string_utils:pronoun_sub(msg, thing);
5return msg;

obvious_exits

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'obvious_exits()' - Return a list of common exit names which are obviously worth looking for in a room.";
2return {"n", "ne", "e", "se", "s", "sw", "w", "nw", "north", "northeast", "east", "southeast", "south", "southwest", "west", "northwest", "u", "d", "up", "down", "out", "exit", "leave", "enter"};

tell_ways

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1":tell_ways (<list of exits>)' - Tell yourself a list of exits, for @ways. You can override it to print the exits in any format.";
2exits = args[1];
3answer = {};
4for e in (exits)
5answer = {@answer, ((e.name + " (") + $string_utils:english_list(e.aliases)) + ")"};
6endfor
7player:tell("Obvious exits: ", $string_utils:english_list(answer), ".");

tell_obj

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"Return the name and number of an object, e.g. 'Root Class (#1)'.";
2o = args[1];
3return (((valid(o) ? o.name | "Nothing") + " (") + tostr(o)) + ")";

parse_out_object

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'parse_out_object (<string>)' -> {<name>, <object>}, or 0. Given a string, attempt to find an object at its beginning or its end. An object can be either an object number, or 'here'. If this succeeds, return a list of the object and the unmatched part of the string, called the name. If it fails, return 0.";
2words = $string_utils:words(args[1]);
3if (!length(words))
4return 0;
5endif
6word1 = words[1];
7wordN = words[$];
8if (length(word1) && (word1[1] == "#"))
9start = 2;
10finish = length(words);
11what = toobj(word1);
12elseif (word1 == "here")
13start = 2;
14finish = length(words);
15what = this.location;
16elseif (length(wordN) && (wordN[1] == "#"))
17start = 1;
18finish = length(words) - 1;
19what = toobj(wordN);
20elseif (wordN == "here")
21start = 1;
22finish = length(words) - 1;
23what = this.location;
24else
25return 0;
26endif
27"toobj() has the nasty property that invalid strings get turned into #0. Here we just pretend that all references to #0 are actually meant for #-1.";
28if (what == #0)
29what = $nothing;
30endif
31name = $string_utils:from_list(words[start..finish], " ");
32if (!name)
33name = valid(what) ? what.name | "Nowhere";
34endif
35return {name, what};

enlist

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'enlist (<x>)' - If x is a list, just return it; otherwise, return {x}. The purpose here is to turn message strings into lists, so that lines can be added. It is not guaranteed to work for non-string non-lists.";
2x = args[1];
3if (!x)
4return {};
5elseif (typeof(x) == LIST)
6return x;
7else
8return {x};
9endif

@at

Spec any any anyFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'@at' - Find out where everyone is. '@at <player>' - Find out where <player> is, and who else is there. '@at <obj>' - Find out who else is at the same place as <obj>. '@at <place>' - Find out who is at the place. The place can be given by number, or it can be a name from your @rooms list. '@at #-1' - Find out who is at #-1. '@at me' - Find out who is in the room with you. '@at home' - Find out who is at your home.";
2this:internal_at(argstr);

at_players

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'at_players ()' - Return a list of players to be displayed by @at.";
2return connected_players();

do_at_all

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'do_at_all ()' - List where everyone is, sorted by popularity of location. This is called when you type '@at'.";
2locations = {};
3parties = {};
4counts = {};
5for who in (this:at_players())
6loc = who.location;
7if (i = loc in locations)
8parties[i] = setadd(parties[i], who);
9counts[i] = counts[i] - 1;
10else
11locations = {@locations, loc};
12parties = {@parties, {who}};
13counts = {@counts, 0};
14endif
15endfor
16locations = $list_utils:sort(locations, counts);
17parties = $list_utils:sort(parties, counts);
18this:print_at_items(locations, parties);

do_at

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'do_at (<location>)' - List the players at a given location.";
2loc = args[1];
3party = {};
4for who in (this:at_players())
5if (who.location == loc)
6party = setadd(party, who);
7endif
8endfor
9this:print_at_items({loc}, {party});

print_at_items

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'print_at_items (<locations>, <parties>)' - Print a list of locations and people, for @at. Override this if you want to make a change to @at's output that you can't make in :at_item.";
2{locations, parties} = args;
3for i in [1..length(locations)]
4(ticks_left() < 4000) && suspend(0);
5player:tell_lines(this:at_item(locations[i], parties[i]));
6endfor

at_item

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'at_item (<location>, <party>)' - Given a location and a list of the people there, return a string displaying the information. Override this if you want to change the format of each line of @at's output.";
2{loc, party} = args;
3su = $string_utils;
4if (this.at_number)
5number = su:right(tostr(loc), 7) + " ";
6else
7number = "";
8endif
9room = su:left(valid(loc) ? loc.name | "[Nowhere]", this.at_room_width);
10if (length(room) > this.at_room_width)
11room = room[1..this.at_room_width];
12endif
13text = (number + room) + " ";
14if (party)
15filler = su:space(length(text) - 2);
16line = text;
17text = {};
18for who in (party)
19name = " " + (valid(who) ? who.name | "[Nobody]");
20if ((length(line) + length(name)) > this:linelen())
21text = {@text, line};
22line = filler + name;
23else
24line = line + name;
25endif
26endfor
27text = {@text, line};
28else
29text = text + " [deserted]";
30endif
31return text;

internal_at

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'internal_at (<argument string>)' - Perform the function of @at. The argument string is whatever the user typed after @at. This is factored out so that other verbs can call it.";
2where = $string_utils:trim(args[1]);
3if (where)
4if (where[1] == "#")
5result = toobj(where);
6if ((!valid(result)) && (result != #-1))
7player:tell("That object does not exist.");
8return;
9endif
10else
11result = this:lookup_room(where);
12if (!valid(result))
13result = $string_utils:match_player(where);
14if (!valid(result))
15player:tell("That is neither a player nor a room name.");
16return;
17endif
18endif
19endif
20if (valid(result) && (!$object_utils:isa(result, $room)))
21result = result.location;
22endif
23this:do_at(result);
24else
25this:do_at_all();
26endif

confunc

Spec this none thisFlags rxdOwner #2Definer #90

Referenced by

none

Source

1"'confunc ()' - Besides the inherited behavior, notify the player's feature objects that the player has connected.";
2if ((valid(cp = caller_perms()) && (caller != this)) && (!$perm_utils:controls(cp, this)))
3return E_PERM;
4endif
5pass(@args);
6set_task_perms(this);
7for feature in (this.features)
8try
9feature:player_connected(player, @args);
10except (E_VERBNF)
11continue feature;
12except id (ANY)
13player:tell("Feature initialization failure for ", feature, ": ", id[2], ".");
14endtry
15endfor

disfunc

Spec this none thisFlags rxdOwner #2Definer #90

Referenced by

none

Source

1"'disfunc ()' - Besides the inherited behavior, notify the player's feature objects that the player has disconnected.";
2if ((valid(cp = caller_perms()) && (caller != this)) && (!$perm_utils:controls(cp, this)))
3return E_PERM;
4endif
5pass(@args);
6"This is forked off to protect :disfunc from buggy :player_disconnected verbs.";
7set_task_perms(this);
8fork (max(0, $login:current_lag()))
9for feature in (this.features)
10try
11feature:player_disconnected(player, @args);
12except (ANY)
13continue feature;
14endtry
15endfor
16endfork

find_property

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'find_property (<name>)' - Search for a property with the given name. The objects searched are those returned by this:find_properties_on(). The printing order relies on $list_utils:remove_duplicates to leave the *first* copy of each duplicated element in a list; for example, {1, 2, 1} -> {1, 2}, not to {2, 1}.";
2name = args[1];
3results = "";
4objects = $list_utils:remove_duplicates(this:find_properties_on());
5for thing in (objects)
6if (valid(thing) && (mom = $object_utils:has_property(thing, name)))
7results = ((((results + "   ") + thing.name) + "(") + tostr(thing)) + ")";
8mom = this:property_inherited_from(thing, name);
9if (thing != mom)
10if (valid(mom))
11results = ((((results + "--") + mom.name) + "(") + tostr(mom)) + ")";
12else
13results = results + "--built-in";
14endif
15endif
16endif
17endfor
18if (results)
19this:tell("The property .", name, " is on", results);
20else
21this:tell("The property .", name, " is nowhere to be found.");
22endif

find_verbs_on

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'find_verbs_on ()' -> list of objects - Return the objects that @find searches when looking for a verb. The objects are searched (and the results printed) in the order returned. Feature objects are included in the search. Duplicate entries are removed by the caller.";
2return {this, this.location, @valid(this.location) ? this.location:contents() | {}, @this:contents(), @this.features};

find_properties_on

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'find_properties_on ()' -> list of objects - Return the objects that @find searches when looking for a property. The objects are searched (and the results printed) in the order returned. Feature objects are *not* included in the search. Duplicate entries are removed by the caller.";
2return {this, this.location, @valid(this.location) ? this.location:contents() | {}, @this:contents()};

property_inherited_from

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'property_inherited_from (<object>, <property name>)' -> object - Return the ancestor of <object> on which <object>.<property> is originally defined. If <object>.<property> is not actually defined, return 0. The property is taken as originally defined on the earliest ancestor of <object> which has it. If the property is built-in, return $nothing.";
2{what, prop} = args;
3if (!$object_utils:has_property(what, prop))
4return 0;
5elseif (prop in $code_utils.builtin_props)
6return $nothing;
7endif
8ancestor = what;
9while ($object_utils:has_property(parent(ancestor), prop))
10ancestor = parent(ancestor);
11endwhile
12return ancestor;

@ref*use

Spec any any anyFlags rdOwner #36Definer #90

Referenced by

none

Source

1"'@refuse <action(s)> [ from <player> ] [ for <time> ]' - Refuse all of a list of one or more actions. If a player is given, refuse actions from the player; otherwise, refuse all actions. If a time is specified, refuse the actions for the given amount of time; otherwise, refuse them for a week. If the actions are already refused, then the only their times are adjusted.";
2if (!argstr)
3player:tell("@refuse <action(s)> [ from <player> ] [ for <time> ]");
4return;
5endif
6stuff = this:parse_refuse_arguments(argstr);
7if (stuff)
8if (((typeof(who = stuff[1]) == OBJ) && (who != $nothing)) && (!is_player(who)))
9player:tell("You must give the name of some player.");
10else
11"'stuff' is now in the form {<origin>, <actions>, <duration>}.";
12this:add_refusal(@stuff);
13player:tell("Refusal of ", this:refusal_origin_to_name(stuff[1]), " for ", $time_utils:english_time(stuff[3]), " added.");
14endif
15endif

@unref*use @allow

Spec any any anyFlags rdOwner #36Definer #90

Referenced by

none

Source

1"'@unrefuse <action(s)> [ from <player> ]' - Stop refusing all of a list of actions. If a player is given, stop refusing actions by the player; otherwise, stop refusing all actions of the given kinds. '@unrefuse everything' - Remove all refusals.";
2if (argstr == "everything")
3if ($command_utils:yes_or_no("Do you really want to erase all your refusals?"))
4this:clear_refusals();
5player:tell("OK, they are gone.");
6else
7player:tell("OK, no harm done.");
8endif
9return;
10endif
11stuff = this:parse_refuse_arguments(argstr);
12if (!stuff)
13return;
14endif
15"'stuff' is now in the form {<origin>, <actions>, <duration>}.";
16origins = stuff[1];
17actions = stuff[2];
18if (typeof(origins) != LIST)
19origins = {origins};
20endif
21n = 0;
22for origin in (origins)
23n = n + this:remove_refusal(origin, actions);
24endfor
25plural = ((n == 1) && (length(origins) == 1)) ? "" | "s";
26if (n)
27player:tell("Refusal", plural, " removed.");
28else
29player:tell("You have no such refusal", plural, ".");
30endif

@refusals

Spec none any anyFlags rdOwner #36Definer #90

Referenced by

none

Source

1"'@refusals' - List your refusals. '@refusals for <player>' - List the given player's refusals.";
2if (iobjstr)
3who = $string_utils:match_player(iobjstr);
4if ($command_utils:player_match_failed(who, iobjstr))
5return;
6endif
7if (!$object_utils:has_verb(who, "refusals_text"))
8player:tell("That player does not have the refusal facility.");
9return;
10endif
11else
12who = player;
13endif
14who:remove_expired_refusals();
15player:tell_lines(this:refusals_text(who));

@refusal-r*eporting

Spec any any anyFlags rdOwner #36Definer #90

Referenced by

none

Source

1"'@refusal-reporting' - See if refusal reporting is on. '@refusal-reporting on', '@refusal-reporting off' - Turn it on or off..";
2if (!argstr)
3player:tell("Refusal reporting is ", this.report_refusal ? "on" | "off", ".");
4elseif (argstr in {"on", "yes", "y", "1"})
5this.report_refusal = 1;
6player:tell("Refusals will be reported to you as they happen.");
7elseif (argstr in {"off", "no", "n", "0"})
8this.report_refusal = 0;
9player:tell("Refusals will happen silently.");
10else
11player:tell("@refusal-reporting on     - turn on refusal reporting");
12player:tell("@refusal-reporting off    - turn it off");
13player:tell("@refusal-reporting        - see if it's on or off");
14endif

parse_refuse_arguments

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'parse_refuse_arguments (<string>)' -> {<who>, <actions>, <duration>} - Parse the arguments of a @refuse or @unrefuse command. <who> is the player requested, or $nothing if none was. <actions> is a list of the actions asked for. <duration> is how long the refusal should last, or 0 if no expiration is given. <errors> is a list of actions (or other words) which are wrong. If there are any errors, this prints an error message and returns 0.";
2words = $string_utils:explode(args[1]);
3possible_actions = this:refusable_actions();
4who = $nothing;
5actions = {};
6until = this.default_refusal_time;
7errors = {};
8skip_to = 0;
9for i in [1..length(words)]
10word = words[i];
11if (i <= skip_to)
12elseif (which = $string_utils:find_prefix(word, possible_actions))
13actions = setadd(actions, possible_actions[which]);
14elseif ((word[$] == "s") && (which = $string_utils:find_prefix(word[1..$ - 1], possible_actions)))
15"The word seems to be the plural of an action.";
16actions = setadd(actions, possible_actions[which]);
17elseif (results = this:translate_refusal_synonym(word))
18actions = $set_utils:union(actions, results);
19elseif ((word == "from") && (i < length(words)))
20"Modified to allow refusals from all guests at once. 5-27-94, Gelfin";
21if (words[i + 1] == "guests")
22who = "all guests";
23elseif (!(typeof(who = $code_utils:toobj(words[i + 1])) == OBJ))
24who = $string_utils:match_player(words[i + 1]);
25if ($command_utils:player_match_failed(who, words[i + 1]))
26return 0;
27endif
28endif
29skip_to = i + 1;
30elseif ((word == "for") && (i < length(words)))
31n_words = this:parse_time_length(words[i + 1..$]);
32until = this:parse_time(words[i + 1..i + n_words]);
33if (!until)
34return 0;
35endif
36skip_to = i + n_words;
37else
38errors = {@errors, word};
39endif
40endfor
41if (errors)
42player:tell((length(errors) > 1) ? "These parts of the command were not understood: " | "This part of the command was not understood: ", $string_utils:english_list(errors, 0, " ", " ", " "));
43return 0;
44endif
45return {this:player_to_refusal_origin(who), actions, until};

time_word_to_seconds

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'time_word_to_seconds (<string>)' - The <string> is expected to be a time word, 'second', 'minute', 'hour', 'day', 'week', or 'month'. Return the number of seconds in that amount of time (a month is taken to be 30 days). If <string> is not a time word, return 0. This is used both as a test of whether a word is a time word and as a converter.";
2return $time_utils:parse_english_time_interval("1", args[1]);

parse_time_length

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'parse_time_length (<words>)' -> n - Given a list of words which is expected to begin with a time expression, return how many of them belong to the time expression. A time expression can be a positive integer, a time word, or a positive integer followed by a time word. A time word is anything that this:time_word_to_seconds this is one. The return value is 0, 1, or 2.";
2words = {@args[1], "dummy"};
3n = 0;
4if (toint(words[1]) || this:time_word_to_seconds(words[1]))
5n = 1;
6endif
7if (this:time_word_to_seconds(words[n + 1]))
8n = n + 1;
9endif
10return n;

parse_time

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'parse_time (<words>)' -> <seconds> - Given a list of zero or more words, either empty or a valid time expression, return the number of seconds that the time expression refers to. This is a duration, not an absolute time.";
2words = args[1];
3"If the list is empty, return the default refusal time.";
4if (!words)
5return this.default_refusal_time;
6endif
7"If the list has one word, either <units> or <n>.";
8"If it is a unit, like 'hour', return the time for 1 <unit>.";
9"If it is a number, return the time for <n> days.";
10if (length(words) == 1)
11return this:time_word_to_seconds(words[1]) || (toint(words[1]) * this:time_word_to_seconds("days"));
12endif
13"The list must contain two words, <n> <units>.";
14return toint(words[1]) * this:time_word_to_seconds(words[2]);

clear_refusals

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'clear_refusals ()' - Erase all of this player's refusals.";
2if ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
3return E_PERM;
4endif
5this.refused_origins = {};
6this.refused_actions = {};
7this.refused_until = {};
8this.refused_extra = {};

set_default_refusal_time

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'set_default_refusal_time (<seconds>)' - Set the length of time that a refusal lasts if its duration isn't specified.";
2if ((caller != this) && (!$perm_utils:controls(caller_perms(), this)))
3return E_PERM;
4endif
5this.default_refusal_time = toint(args[1]);

refusable_actions

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'refusable_actions ()' -> {'page', 'whisper', ...} - Return a list of the actions that can be refused. This is a verb, rather than a property, so that it can be inherited properly. If you override this verb to add new refusable actions, write something like 'return {@pass (), 'action1', 'action2', ...}'. That way people can add new refusable actions at any level of the player class hierarchy, without clobbering any that were added higher up.";
2return {"page", "whisper", "move", "join", "accept", "mail"};

translate_refusal_synonym

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'translate_refusal_synonym (<word>)' -> list - If the <word> is a synonym for some set of refusals, return the list of those refusals. Otherwise return the empty list, {}. Programmers can override this verb to provide more synonyms.";
2word = args[1];
3if (word == "all")
4return this:refusable_actions();
5endif
6return {};

default_refusals_text_filter

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'default_refusals_text_filter (<origin>, <actions>)' - Return any actions by this <origin> which should be included in the text returned by :refusals_text. This is the default filter, which includes all actions.";
2return args[2];

refusals_text

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'refusals_text (<player>, [<filter verb name>])' - Return text describing the given player's refusals. The filter verb name is optional; if it is given, this verb takes an origin and a list of actions and returns any actions which should be included in the refusals text. This verb works only if <player> is a player who has the refusals facility; it does not check for this itself.";
2{who, ?filter_verb = "default_refusals_text_filter"} = args;
3text = {};
4for i in [1..length(who.refused_origins)]
5origin = who.refused_origins[i];
6actions = this:(filter_verb)(origin, who.refused_actions[i]);
7if (actions)
8line = "";
9for action in (actions)
10line = (line + " ") + action;
11endfor
12line = (this:refusal_origin_to_name(origin) + ": ") + line;
13line = (ctime(who.refused_until[i]) + " ") + line;
14text = {@text, line};
15endif
16endfor
17if (!text)
18text = {"No refusals."};
19endif
20return text;

player_to_refusal_origin

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'player_to_refusal_origin (<player>)' -> <origin> - Convert a player to a unique identifier called the player's 'refusal origin'. For most players, it's just their object number. For guests, it is a hash of the site they are connecting from. Converting an origin to an origin is a safe no-op--the code relies on this.";
2who = args[1];
3if ((((typeof(who) == OBJ) && valid(who)) && (parent(who) == $object_utils:has_property($local, "guest"))) ? $local.guest | $guest)
4return who:connection_name_hash("xx");
5else
6return who;
7endif

refusal_origin_to_name

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'refusal_origin_to_name (<origin>)' -> string - Convert a refusal origin to a name.";
2origin = args[1];
3if (origin in {"all guests", "everybody"})
4return origin;
5elseif (typeof(origin) != OBJ)
6return "a certain guest";
7elseif (origin == #-1)
8return "Everybody";
9else
10return $string_utils:name_and_number(origin);
11endif

check_refusal_actions

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'check_refusal_actions (<actions>)' - Check a list of refusal actions, and return whether they are all legal.";
2actions = args[1];
3legal_actions = this:refusable_actions();
4for action in (actions)
5if (!(action in legal_actions))
6return 0;
7endif
8endfor
9return 1;

add_refusal

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'add_refusal (<origin>, <actions> [, <duration> [, <extra>]])' - Add refusal(s) to this player's list. <Actions> is a list of the actions to be refused. The list should contain only actions, no synonyms. <Origin> is the actor whose actions are to be refused. <Until> is the time that the actions are being refused until, in the form returned by time(). It is optional; if it's not given, it defaults to .default_refusal_time. <Extra> is any extra information; it can be used for comments, or to make finer distinctions about the actions being refused, or whatever. If it is not given, it defaults to 0. The extra information is per-action; that is, it is stored separately for each action that it applies to.";
2if (caller != this)
3return E_PERM;
4endif
5{orig, actions, ?duration = this.default_refusal_time, ?extra = 0} = args;
6origins = this:player_to_refusal_origin(orig);
7if (typeof(origins) != LIST)
8origins = {origins};
9endif
10if (typeof(actions) != LIST)
11actions = {actions};
12endif
13if (!this:check_refusal_actions(actions))
14return E_INVARG;
15endif
16until = time() + duration;
17for origin in (origins)
18if (i = origin in this.refused_origins)
19this.refused_until[i] = until;
20for action in (actions)
21if (j = action in this.refused_actions[i])
22this.refused_extra[i][j] = extra;
23else
24this.refused_actions[i] = {@this.refused_actions[i], action};
25this.refused_extra[i] = {@this.refused_extra[i], extra};
26endif
27endfor
28else
29this.refused_origins = {@this.refused_origins, origin};
30this.refused_actions = {@this.refused_actions, actions};
31this.refused_until = {@this.refused_until, until};
32this.refused_extra = {@this.refused_extra, $list_utils:make(length(actions), extra)};
33endif
34endfor

remove_refusal

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'remove_refusal (<origin>, <actions>)' - Remove any refused <actions> by <origin>. The <actions> list should contain only actions, no synonyms. Return the number of such refusals found (0 if none).";
2if (caller != this)
3return E_PERM;
4endif
5{origin, actions} = args;
6if (typeof(actions) != LIST)
7actions = {actions};
8endif
9count = 0;
10i = origin in this.refused_origins;
11if (i)
12for action in (actions)
13if (j = action in this.refused_actions[i])
14this.refused_actions[i] = listdelete(this.refused_actions[i], j);
15this.refused_extra[i] = listdelete(this.refused_extra[i], j);
16count = count + 1;
17endif
18endfor
19if (!this.refused_actions[i])
20this.refused_origins = listdelete(this.refused_origins, i);
21this.refused_actions = listdelete(this.refused_actions, i);
22this.refused_until = listdelete(this.refused_until, i);
23this.refused_extra = listdelete(this.refused_extra, i);
24endif
25endif
26return count;

remove_expired_refusals

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'remove_expired_refusals ()' - Remove refusal entries which are past their time limits.";
2origins = {};
3"Before removing any refusals, figure out which ones to remove. Removing one changes the indices and invalidates the loop invariant.";
4for i in [1..length(this.refused_origins)]
5if (time() >= this.refused_until[i])
6origins = {@origins, this.refused_origins[i]};
7endif
8endfor
9for origin in (origins)
10this:remove_refusal(origin, this:refusable_actions());
11endfor

refuses_action

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'refuses_action (<origin>, <action>, ...)' - Return whether this object refuses the given <action> by <origin>. <Origin> is typically a player. Extra arguments after <origin>, if any, are used to further describe the action.";
2"Modified by Diopter (#98842) at LambdaMOO";
3{origin, action, @extra_args} = args;
4extra_args = {origin, @extra_args};
5rorigin = this:player_to_refusal_origin(origin);
6if (((which = rorigin in this.refused_origins) && (action in this.refused_actions[which])) && this:("refuses_action_" + action)(which, @extra_args))
7return 1;
8elseif (((((typeof(rorigin) == OBJ) && valid(rorigin)) && (which = rorigin.owner in this.refused_origins)) && (action in this.refused_actions[which])) && this:("refuses_action_" + action)(which, @extra_args))
9return 1;
10elseif ((((which = $nothing in this.refused_origins) && (rorigin != this)) && (action in this.refused_actions[which])) && this:("refuses_action_" + action)(which, @extra_args))
11return 1;
12elseif ((((which = "all guests" in this.refused_origins) && $object_utils:isa(origin, $guest)) && (action in this.refused_actions[which])) && this:("refuses_action_" + action)(which, @extra_args))
13return 1;
14endif
15return 0;

refuses_action_*

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'refuses_action_* (<which>, <origin>, ...)' - The action (such as 'whisper' for the verb :refuses_action_whisper) is being considered for refusal. Return whether the action should really be refused. <Which> is an index into this.refused_origins. By default, always refuse non-outdated actions that get this far.";
2{which, @junk} = args;
3if (time() >= this.refused_until[which])
4fork (0)
5"This <origin> is no longer refused. Remove any outdated refusals.";
6this:remove_expired_refusals();
7endfork
8return 0;
9else
10return 1;
11endif

report_refusal

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'report_refusal (<player>, <message>, ...)' - If refusal reporting is turned on, print the given <message> to report the refusal of some action by <player>. The message may take more than one argument. You can override this verb to do more selective reporting.";
2if (this.report_refusal)
3this:tell(@listdelete(args, 1));
4endif

wh*isper

Spec any at/to thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'whisper <message> to <this player>' - Whisper a message to this player which nobody else can see.";
2if (this:refuses_action(player, "whisper"))
3player:tell(this:whisper_refused_msg());
4this:report_refusal(player, "You just refused a whisper from ", player.name, ".");
5else
6pass(@args);
7endif

receive_page

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'receive_page (<message>)' - Receive a page. If the page is accepted, pass(@args) shows it to the player.";
2if (this:refuses_action(player, "page"))
3this.page_refused = task_id();
4return 0;
5endif
6this.page_refused = 0;
7return pass(@args);

page_echo_msg

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'page_echo_msg ()' - Return a message to inform the pager what happened to their page.";
2if (task_id() == this.page_refused)
3this:report_refusal(player, "You just refused a page from ", player.name, ".");
4return this:page_refused_msg();
5else
6return pass(@args);
7endif

moveto acceptable

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'moveto (<destination>)', 'accept (<object>)' - Check whether this :moveto or :accept is allowed or refused. If it is allowed, do it. This code is slightly modified from an original verb by Grump.  Upgraded by Bits to account for forthcoming 1.8.0 behavior of callers().";
2by = callers();
3"Ignore all the verbs on this.";
4while (((y = by[1])[1] == this) && (y[2] == verb))
5by = listdelete(by, 1);
6endwhile
7act = (verb == "moveto") ? "move" | "accept";
8if ((player != this) && this:refuses_action(player, act, args[1]))
9"check player";
10return 0;
11endif
12last = #-1;
13for k in (by)
14if ((((perms = k[3]) == #-1) && (k[2] != "")) && (k[1] == #-1))
15elseif ((!perms.wizard) && (perms != this))
16if (perms != last)
17"check for possible malicious programmer";
18if (this:refuses_action(perms, act, args[1]))
19return 0;
20endif
21last = perms;
22endif
23endif
24endfor
25return pass(@args);

receive_message

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

none

Source

1"'receive_message (<message>, <sender>)' - Receive the given mail message from the given sender. This version handles refusal of the message.";
2if ((!$perm_utils:controls(caller_perms(), this)) && (caller != this))
3return E_PERM;
4elseif (this:refuses_action(args[2], "mail"))
5return this:mail_refused_msg();
6else
7return pass(@args);
8endif

whisper_refused_msg page_refused_msg mail_refused_msg

Spec this none thisFlags rxdOwner #36Definer #90

Referenced by

Source

1"'whisper_refused_msg()', 'page_refused_msg()', etc. - Return a message string.";
2return $string_utils:pronoun_sub(this.(verb), this);

last_huh

Spec this none thisFlags rxdOwner #2Definer #90

Referenced by

none

Source

1set_task_perms(caller_perms());
2if (pass(@args))
3return 1;
4endif
5{verb, args} = args;
6if (valid(dobj = $string_utils:literal_object(dobjstr)) && (r = $match_utils:match_verb(verb, dobj, args)))
7return r;
8elseif (valid(iobj = $string_utils:literal_object(iobjstr)) && (r = $match_utils:match_verb(verb, iobj, args)))
9return r;
10else
11return 0;
12endif

ping_features

Spec this none thisFlags rxdOwner #2Definer #90

Referenced by

none

Source

1":ping_features()";
2" -- cleans up the .features list to remove !valid objects";
3" ==> cleaned-up .features list";
4features = this.features;
5for x in (features)
6if (!$recycler:valid(x))
7features = setremove(features, x);
8endif
9endfor
10return this.features = features;

set_owned_objects

Spec this none thisFlags rxdOwner #2Definer #90

Referenced by

none

Source

1":set_owned_objects( LIST owned-objects list )";
2"  -- set your .owned_objects, ordered as you please";
3"  -- no, it will NOT let you set to to anything you want";
4if ((caller == this) || $perm_utils:controls(caller_perms(), this))
5new = args[1];
6old = this.owned_objects;
7"make sure they're the same";
8if (length(new) != length(old))
9return E_INVARG;
10endif
11for i in (new)
12old = setremove(old, i);
13endfor
14if (old)
15"something's funky";
16return E_INVARG;
17endif
18return this.owned_objects = new;
19else
20return E_PERM;
21endif

init_for_core

Spec this none thisFlags rxdOwner #2Definer #90

Referenced by

Source

1if (caller_perms().wizard)
2pass();
3if ($code_utils:verb_location() == this)
4this.rooms = {};
5else
6clear_property(this, "rooms");
7endif
8endif

@stats @score @points @status

Spec any none noneFlags rdOwner #2Definer #90

Referenced by

none

Source

1"Allows you to view other player stats, as well as your own.";
2if ((parent(player) == $rpgamer) && (player != this))
3return player:tell("You can only view your own stats.");
4elseif (dobjstr)
5dobj = $string_utils:match_player(dobjstr);
6x = valid(dobj) ? dobj | $match_utils:match_list(dobjstr, $object_utils:descendants($puppet));
7dobj = ((typeof(x) == LIST) && x) ? x[1] | dobj;
8if (valid(dobj))
9dobj:(verb)();
10else
11player:tell("No definite match for a player by the name \"", dobjstr, "\".");
12endif
13else
14pass(@args);
15endif
16"WIZ PERMS";

@award

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

Referenced by

none

Source

1"USAGE: @award major/maj/standard/std/minor/min to <player>";
2"Awards free points for good roleplay";
3"The $rp_regulator feature has a wiz-only \"@awards\" verb that lists all recent awards.";
4if (this == iobj)
5return player:tell("I don't understand that.");
6endif
7if ((!(dobjstr in {"major", "maj", "standard", "std", "minor", "min"})) || (!iobjstr))
8player:tell("USAGE: @award major/maj/standard/std/minor/min to <player>");
9else
10iobj = $string_utils:match_player(iobjstr);
11if (valid(iobj))
12if (dobjstr in {"major", "maj"})
13iobj.free_points = iobj.free_points + 2.5;
14a = 3;
15elseif (dobjstr in {"standard", "std"})
16iobj.free_points = iobj.free_points + 1.0;
17a = 2;
18else
19iobj.free_points = iobj.free_points + 0.25;
20a = 1;
21endif
22player:tell(dobjstr, " awarded to ", iobj:title(), ".");
23`$rp_regulator.awards = {@$rp_regulator.awards, {iobj, a, player, time()}} ! E_PROPNF => ""';
24else
25player:tell("No definite match for a player by the name \"", iobjstr, "\".");
26endif
27endif
28"WIZ PERMS";

@sanctuaries

Spec none none noneFlags rdOwner #2Definer #90

Referenced by

none

Source

1"@sanctuaries => Tells player all sanctuaries.";
2"                If the player is a wizard, fixes unset dump_loc properties.";
3for x in ($object_utils:descendants_suspended($rpg_room))
4(ticks_left() < 4000) && suspend(0);
5if (x.sanctuary)
6x.dump_loc = (((player.wizard && (!x.f)) && (x.dump_loc == $rpg_room.dump_loc)) && `x.virtual_exits ! E_PROPNF => 0') ? x.virtual_exits[random($)][2] | x.dump_loc;
7mail = (x.sanctuary == 2) ? " (MAIL)" | "";
8player:tell($string_utils:nn(x), mail, " dumps to ", $string_utils:nn(x.dump_loc));
9endif
10endfor

whois

Spec any any anyFlags rdOwner #2Definer #90

Referenced by

none

Source

1"syntax: \"whois <description>\" or \"whois in <#room or org>\"";
2"        Use no arguments for a complete rpgamer listing.";
3if (player != this)
4return player:tell("This FO is for administrator use only.");
5"in case someone has made this verb +x.";
6endif
7thelist = {};
8{one, two} = (pieces = $string_utils:first_word(argstr)) ? pieces | {"", ""};
9argstr = (one in {"a", "in"}) ? two | argstr;
10org = "";
11chargen = `$local.chargen ! ANY => $chargen';
12if (one == "in")
13if ($object_utils:isa(iobj, $room))
14for p in (iobj.contents)
15if (is_player(p))
16thelist = {@thelist, p};
17endif
18endfor
19elseif (two)
20org = (z = $string_utils:match_stringlist(two, $list_utils:slice(chargen.orgs))) ? chargen.orgs[z][1] | two;
21endif
22endif
23if ((one in {"", "in"}) && (!$object_utils:isa(iobj, $room)))
24total = 0;
25thelist = $object_utils:descendants_suspended($rpgamer);
26if (org)
27for x in (thelist)
28if (is_player(x))
29(ticks_left() < 4000) && suspend(0);
30if (x.org == org)
31blurb = x.wizard ? "  [green]******* WIZARD[normal]" | "";
32blurb = ((!blurb) && $object_utils:isa(x, $frand_class)) ? "  [red]*** ADMINISTRATOR[normal]" | blurb;
33player:tell($string_utils:nn(x), blurb);
34total = total + 1;
35endif
36endif
37endfor
38else
39for x in (thelist)
40if (is_player(x))
41(ticks_left() < 4000) && suspend(0);
42player:tell($string_utils:nn(x), " ", x.org, ", a ", x.gender, " ", x.race);
43total = total + 1;
44endif
45endfor
46endif
47player:tell("_____________");
48return player:tell(total, " TOTAL");
49endif
50for p in (players())
51(ticks_left() < 2000) && suspend(0);
52if (valid(m = $match_utils:match(argstr, {p})) && (m == p))
53thelist = {@thelist, p};
54endif
55endfor
56if (thelist == {})
57thematch = $failed_match;
58elseif (length(thelist) == 1)
59thematch = thelist[1];
60else
61thematch = thelist;
62endif
63if (typeof(thematch) == LIST)
64matches = {};
65for z in (thematch)
66suspend(0);
67matches = {@matches, (z.location == this.location) ? "[red]*[normal]" + $string_utils:nn(z) | $string_utils:nn(z)};
68endfor
69player:tell($string_utils:english_list(matches), " are all players matching that description.");
70player:tell("[red]*[normal] = your location.");
71elseif (thematch == $failed_match)
72player:tell("No match found.");
73else
74player:tell($string_utils:nn(thematch), ", who is in ", $string_utils:nn(thematch.location));
75endif