Pasting Feature #84

Parent #68Owner #29Flags read, fertileSource hellcore/hellcore.db

Aliases: Pasting Feature

3 verbs · 34 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
@pasteany any anyrxd#8427
|*any any anyrxd#8416
@pasteto @paste-toany none nonerxd#8422

Properties

PropertyDefinerFlagsOwnerValue
warehouse#68r#29<clear>
help_msg#68rc#29"The Pasting Feature is mostly useful to people with fancy clients (such as Emacs) or who connect using a windowing system that allows them to copy text they've already seen. It's intended to give people a way to quote verbatim text at other people in the room."
feature_verbs#68r#29{"@paste", "|", "@paste-to"}
feature_ok#68r#29<clear>
handed#5rc#29<clear>
wield_msg#5rc#29<clear>
unwield_msg#5rc#29<clear>
size#5rc#29<clear>
look_place_msg#5rc#29<clear>
value#5rc#29<clear>
get_msg#5rc#29<clear>
drop_msg#5rc#29<clear>
get_fail_msg#5rc#29<clear>
junk_ok#5rc#29<clear>
floats#5rc#29<clear>
long_name_msg#5rc#29<clear>
article#5rc#29<clear>
setup_list#5rc#29<clear>
health#5rc#29<clear>
health_max#5rc#29<clear>
min_skill#5rc#29<clear>
skill#5rc#29<clear>
recipe_for#5rc#29<clear>
carried_msg#5rc#29<clear>
aliases#1rc#29{"Pasting Feature"}
description#1rc#29"Verbs useful to people using a windowing system to paste text at people."
object_size#1r#29{5164, 1298433815}
hidden_verbs#1rc#29<clear>
phelp_msg#1rc#29<clear>
weight#1rc#29<clear>
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #68 Generic Feature Object#5 generic thing#1 root

Children: none

Call graph

calls n84_0 #84:@paste n48_3 #48:read_lines n84_0->n48_3 n6_152 #6:real_name n84_0->n6_152 n20_35 #20:pronoun_sub_secure n84_0->n20_35 n51_36 #51:verb_or_property n84_0->n51_36 n20_3 #20:centre n84_0->n20_3 n20_77 #20:escape n84_0->n20_77 n48_8 #48:suspend_if_needed n84_0->n48_8 n107_43 #107:tell n84_0->n107_43 n84_1 #84:|* n84_1->n6_152 n84_1->n20_77 n20_34 #20:pronoun_sub n84_1->n20_34 n107_9 #107:dname n84_1->n107_9 n84_2 #84:@pasteto n84_2->n48_3 n84_2->n6_152 n84_2->n20_3 n84_2->n107_43 n20_20 #20:match_player n84_2->n20_20

Source

@paste

Spec any any anyFlags rxdOwner #29Definer #84

Referenced by

none

Source

1"Usage: @paste <prefix> <suffix>";
2"Announce a series of entered lines to the room the player is in.";
3"Before the lines are quoted, player.paste_header is run through";
4"$string_utils:pronoun_sub(), and if the result contains the player's";
5"name, it is used as a header.  Otherwise player.name centered in a";
6"line of dashes is used.";
7"A footer comes afterwards, likewise derived from player.paste_footer.";
8"<prefix> and <suffix> are placed before and after each line.";
9"";
10"This verb is, as one might guess, designed for pasting text to MOO using";
11"GnuEmacs or a windowing system.  You should remember that after you";
12"have pasted the lines in, you must type . on a line by itself, or you'll";
13"sit around waiting for $command_utils:read_lines() to finish _forever_.";
14{?prefix = "", ?suffix = ""} = args;
15lines = $command_utils:read_lines();
16namestr = (is_a(player, $immortal) && player.code_name) ? player.code_name | player:real_name();
17header = $string_utils:pronoun_sub_secure($code_utils:verb_or_property(player, "paste_header"), "") || $string_utils:center(namestr, 75, "-");
18to_tell = {header};
19for line in (lines)
20to_tell = listappend(to_tell, (prefix + $su:escape(line)) + suffix);
21endfor
22to_tell = listappend(to_tell, $string_utils:pronoun_sub_secure($code_utils:verb_or_property(player, "paste_footer"), "") || $string_utils:center("finished", 75, "-"));
23for thing in (player.location.contents)
24$command_utils:suspend_if_needed(0);
25thing.listening && thing:tell_lines(to_tell);
26endfor
27player:tell("Done @pasting.");

|*

Spec any any anyFlags rxdOwner #29Definer #84

Referenced by

none

Source

1"Echo a line prefaced by a vertical bar.";
2"Usage:";
3"  |message";
4"Example:";
5"  Hacker wants to echo to the room what he just saw. He enters (either by hand, or with Emacs or a windowing system):";
6"      |Haakon has disconnected.";
7"  The room sees:";
8"      Hacker | Haakon has disconnected.";
9if (($skills.brains:total(player) < 6) && (!is_a(player, $immortal)))
10m = #130830.emotes;
11m = m[random(length(m))];
12m = $su:ps(m);
13player.location:announce_all(player:dname(), m);
14return;
15endif
16player.location:announce_all((((player:real_name() + " | ") + $su:escape(verb[2..$])) + " ") + $su:escape(argstr));

@pasteto @paste-to

Spec any none noneFlags rxdOwner #29Definer #84

Referenced by

none

Source

1"Syntax: @paste-to <player>";
2"";
3"Which will then prompt you for the lines to privately send to <player>. The lines will be surrounded by a default footer and header.";
4target = $string_utils:match_player(dobjstr);
5if (!valid(target))
6player:tell("@paste-to who?");
7return;
8endif
9if ((!player.programmer) && (!target.programmer))
10player:tell("Sorry, you cannot @paste-to other players.");
11return;
12endif
13prefix = "";
14suffix = "";
15lines = $command_utils:read_lines();
16to_tell = {$string_utils:center("Private message from " + player:real_name(), 75, "-")};
17for line in (lines)
18to_tell = listappend(to_tell, (prefix + line) + suffix);
19endfor
20to_tell = listappend(to_tell, $string_utils:center("end message", 75, "-"));
21target:tell_lines(to_tell);
22player:tell("Done @pasting.");