Pasting Feature #92

Parent #74Owner #36Flags readSource RPG Core/rpgcore-patched.db

Aliases: Pasting Feature

3 verbs · 24 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
@pasteany any anyrxd#9226
|*any any anyrxd#929
@pasteto @paste-toany none nonerxd#9218

Properties

PropertyDefinerFlagsOwnerValue
warehouse#74r#36<clear>
help_msg#74rc#36"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#74r#36{"@paste", "|", "@paste-to"}
feature_ok#74r#36<clear>
drop_failed_msg#5rc#36<clear>
drop_succeeded_msg#5rc#36<clear>
odrop_failed_msg#5rc#36<clear>
odrop_succeeded_msg#5rc#36<clear>
otake_succeeded_msg#5rc#36<clear>
otake_failed_msg#5rc#36<clear>
take_succeeded_msg#5rc#36<clear>
take_failed_msg#5rc#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#1rc#36{"Pasting Feature"}
description#1rc#36"Verbs useful to people using a windowing system to paste text at people."
object_size#1r#36{4838, -1090650497}
html#1rc#36<clear>

Ancestry

Ancestors (nearest first): #74 Generic Feature Object#5 generic thing#102 subthing#1 Root Class

Children: none

Call graph

calls n92_0 #92:@paste n56_3 #56:read_lines n92_0->n56_3 n20_35 #20:pronoun_sub_secure n92_0->n20_35 n59_36 #59:verb_or_property n92_0->n59_36 n20_3 #20:centre n92_0->n20_3 n6_18 #6:tell n92_0->n6_18 n92_2 #92:@pasteto n92_2->n56_3 n92_2->n20_3 n92_2->n6_18 n20_20 #20:match_player n92_2->n20_20 n56_1 #56:player_match_result n92_2->n56_1

Source

@paste

Spec any any anyFlags rxdOwner #36Definer #92

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();
16header = $string_utils:pronoun_sub_secure($code_utils:verb_or_property(player, "paste_header"), "") || $string_utils:center(player.name, 75, "-");
17to_tell = {header};
18for line in (lines)
19to_tell = listappend(to_tell, (prefix + line) + suffix);
20endfor
21to_tell = listappend(to_tell, $string_utils:pronoun_sub_secure($code_utils:verb_or_property(player, "paste_footer"), "") || $string_utils:center("finished", 75, "-"));
22for thing in (player.location.contents)
23(ticks_left() < 4000) && suspend(0);
24thing:tell_lines(to_tell);
25endfor
26player:tell("Done @pasting.");

|*

Spec any any anyFlags rxdOwner #36Definer #92

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.";
9player.location:announce_all((((player.name + " | ") + verb[2..$]) + " ") + argstr);

@pasteto @paste-to

Spec any none noneFlags rxdOwner #36Definer #92

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);
5$command_utils:player_match_result(target, dobjstr);
6if (!valid(target))
7return;
8endif
9prefix = "";
10suffix = "";
11lines = $command_utils:read_lines();
12to_tell = {$string_utils:center("Private message from " + player.name, 75, "-")};
13for line in (lines)
14to_tell = listappend(to_tell, (prefix + line) + suffix);
15endfor
16to_tell = listappend(to_tell, $string_utils:center("end message", 75, "-"));
17target:tell_lines(to_tell);
18player:tell("Done @pasting.");