Mail Room #39

Parent #43Owner #29Flags readSource hellcore/hellcore.db

Aliases: Mail Room

27 verbs · 119 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
working_onthis none thisrxd#391
parse_invokethis none thisrxd#3940
init_sessionthis none thisrxd#3919
pri*ntany none nonerxd#3912
message_with_headersthis none thisrxd#391
subj*ect:any any anyrxd#399
set_subjectthis none thisrxd#397
sendingthis none thisrxd#399
to*:any any anyrxd#399
also*-to: cc*:any any anyrxd#397
not-to*: uncc*:any any anyrxd#3936
parse_recipientsthis none thisrxd#3915
recipient_namesthis none thisrxd#391
make_messagethis none thisrxd#391
name_listthis none thisrxd#392
parse_msg_headersthis none thisrxd#3941
check_answer_flagsthis none thisrxd#3936
reply-to*: replyto*:any any anyrxd#3911
sendnone none nonerxd#3947
whoany none nonerxd#3919
showlistsany none nonerxd#396
subsc*ribeany at/to anyrxd#3926
unsubsc*ribeany out of/from inside/from anyrxd#3924
retain_session_on_exitthis none thisrxd#391
no_littering_msgthis none thisrxd#392
parse_msg_headers(slow)this none thisrxd#3940
local_editing_infothis none thisrxd#396

Properties

PropertyDefinerFlagsOwnerValue
replytos#39#29{}
recipients#39#29{}
subjects#39#29{}
sending#39#29{}
readable#43r#29{}
times#43r#29{}
commands2#43rc#29
list of 2{{"say", "emote", "lis*t", "ins*ert", "n*ext,p*rev", "enter", "del*ete", "f*ind", "s*ubst", "m*ove,c*opy", "join*l", "fill"}, {"y*ank", "w*hat", "subj*ect", "to", "also-to", "reply-to", "showlists,unsubscribe", "who", "pri*nt", "send", "abort", "q*uit,done,pause"}}
help#43rc#29{}
no_text_msg#43rc#29"Message body is empty."
commands#43rc#29
list of 8{{"subj*ect", "[<text>]"}, {"to", "[<rcpt>..]"}, {"also-to", "[<rcpt>..]"}, {"reply-to", "[<rcpt>..]"}, {"who", "[<rcpt>..]"}, {"pri*nt", ""}, {"send", ""}, {"showlists,unsubscribe", ""}}
invoke_task#43r#290
exit_on_abort#43rc#291
previous_session_msg#43rc#29"You need to either SEND it or ABORT it before you can start another message."
stateprops#43r#29
list of 8{{"sending", 0}, {"replytos", {}}, {"recipients", {}}, {"subjects", ""}, {"texts", {}}, {"changes", 0}, {"inserting", 1}, {"readable", 0}}
depart_msg#43rc#29"%N flattens out into a largish postage stamp and floats away."
return_msg#43rc#29"A largish postage stamp floats into the room and fattens up into %n."
no_littering_msg#43rc#29
list of 4{"Saving your message so that you can finish it later.", "To come back, give the `@send' command with no arguments.", "Please come back and SEND or ABORT if you don't intend to be working on this", "message in the immediate future. Keep Our MOO Clean! No Littering!"}
no_change_msg#43rc#29<clear>
change_msg#43rc#29<clear>
nothing_loaded_msg#43rc#29"You're not editing anything!"
texts#43#29{}
active#43r#29{}
changes#43#29{}
inserting#43#29{}
original#43r#29{}
no_actions#43rc#29<clear>
wiz_editors#43rc#29<clear>
who_location_msg#3rc#29"%L [mailing]"
exits#3c#29{}
go_fail_msg#3rc#29<clear>
outdoor#3rc#29<clear>
covers#3rc#29<clear>
covering#3rc#29<clear>
tracks#3rc#29
list of 20{{#275456, 1250750391, 1250750463}, {#299353, 1257890461, 1257890544}, {#364733, 1301945925, 1301945927}, {#143894, 1309818706, 1309818711}, {#142, 1252623283, 1252623911}, {#275649, 1290657653, 1290657663}, {#98, 1311536184, 1311536431}, {#364606, 1298049019, 1298049024}, {#298567, 1291336547, 1291336553}, {#349965, 1256003535, 1256003544}, {#364717, 1256003615, 1256003627}, {#2922, 1300796593, 1300796600}, {#413632, 1256465162, 1256465171}, {#645, 1303704052, 1303704321}, {#658, 1264480260, 1264480282}, {#381051, 1310077028, 1310077052}, {#276116, 1292783915, 1292783919}, {#1848, 1311042017, 1311042048}, {#657, 1306964419, 1306964428}, {#385915, 1284020000, 1284020166}}
windows#3rc#29<clear>
public#3rc#29<clear>
drop_msg#3rc#29<clear>
get_msg#3rc#29<clear>
contents_msg#3rc#29<clear>
contents_many_msg#3rc#29<clear>
default_posture_msg#3rc#29<clear>
seats#3rc#29<clear>
sitting#3rc#29{}
reclining#3rc#29{}
sit_msg#3rc#29<clear>
osit_msg#3rc#29<clear>
sit_from_reclining#3rc#29<clear>
osit_from_reclining#3rc#29<clear>
rise_msg#3rc#29<clear>
orise_msg#3rc#29<clear>
icon#3rc#29<clear>
map#3rc#29{" ", " ", " ~1b[36m~1b[1m~1b[44m()~1b[0m ", " ", " "}
recent_noises#3rc#29{9791251, 7096779, 5111930, 4024293, 38674}
fall_into_msg#3rc#29<clear>
size#3rc#29<clear>
sit_from_reclining_msg#3rc#29<clear>
osit_from_reclining_msg#3rc#29<clear>
look_sitting_and_reclining#3rc#29<clear>
look_sitting_msg#3rc#29<clear>
recline_full_msg#3rc#29<clear>
already_sitting_msg#3rc#29<clear>
already_reclining_msg#3rc#29<clear>
recline_from_sitting_msg#3rc#29<clear>
orecline_from_sitting_msg#3rc#29<clear>
recline_msg#3rc#29<clear>
orecline_msg#3rc#29<clear>
look_reclining_msg#3rc#29<clear>
sitting_doing_msg#3rc#29<clear>
reclining_doing_msg#3rc#29<clear>
rise_failed_msg#3rc#29<clear>
infect_interval#3rc#29<clear>
no_exit_msg#3rc#29<clear>
x#3rc#29<clear>
y#3rc#29<clear>
z#3rc#29<clear>
residents#3rc#29<clear>
sit_full_msg#3rc#29<clear>
value#3rc#29<clear>
rustle_msg#3rc#29<clear>
last_rustle#3rc#29<clear>
thing_fall_into_msg#3rc#29<clear>
decal_fall_into_msg#3rc#29<clear>
client_icon#3rc#29<clear>
client_map#3rc#29{"aaaaaaaaaa", "aaaaaaaaaa", "aaaaabaaaa", "aaaaaaaaaa", "aaaaaaaaaa"}
track_msg#3rc#29<clear>
watched#3rc#290
max_objects#3rc#29<clear>
show_map#3rc#29<clear>
objects_to_echo#3rc#29<clear>
always_brief#3rc#29<clear>
furniture#3rc#29{}
fall_into_noise#3rc#29<clear>
ambience#3rc#29<clear>
temperature#3rc#2965
last_temp_update#3rc#291311540973
continue_look_self_msg#3rc#29<clear>
map_restricted#3rc#29<clear>
global_xyz#3rc#29{0, 0, 0}
common_name_msg#3rc#29<clear>
verb_subs#3rc#29<clear>
darkness#3rc#29{0, 0}
total_dark_description_msg#3rc#29<clear>
has_commands#3rc#291
too_dark_msg#3rc#29<clear>
next_room_to_global_origin#3rc#29#-1
global_xyz_anchor#3r#3610
search_items#3rc#29<clear>
search_items_left#3rc#29{}
already_searched#3rc#29{}
aliases#1rc#29{"Mail Room"}
description#1rc#29<clear>
object_size#1r#29{29690, 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): #43 Generic Editor#3 generic room#1 root

Children: none

Call graph

calls n39_0 #39:working_on n43_26 #43:ok n39_0->n43_26 n39_7 #39:sending n39_0->n39_7 n39_12 #39:recipient_names n39_0->n39_12 n39_7->n43_26 n43_18 #43:set_changed n39_7->n43_18 n51_37 #51:task_valid n39_7->n51_37 n39_12->n43_26 n38_14 #38:name_list n39_12->n38_14 n39_1 #39:parse_invoke n1_11 #1:tell_lines n39_1->n1_11 n39_11 #39:parse_recipients n39_1->n39_11 n107_43 #107:tell n39_1->n107_43 n48_2 #48:read n39_1->n48_2 n39_15 #39:parse_msg_headers n39_1->n39_15 n38_40 #38:to_text n39_1->n38_40 n43_57 #43:fill_string n39_1->n43_57 n39_11->n107_43 n38_10 #38:match_recipient n39_11->n38_10 n38_43 #38:is_recipient n39_11->n38_43 n38_11 #38:match_failed n39_11->n38_11 n39_15->n107_43 n45_5 #45:isa n39_15->n45_5 n38_15 #38:parse_address_field n39_15->n38_15 n45_6 #45:ancestors n39_15->n45_6 n39_2 #39:init_session n39_2->n39_0 n39_2->n43_26 n43_24 #43:load n39_2->n43_24 n48_3 #48:read_lines n39_2->n48_3 n43_29 #43:insert_line n39_2->n43_29 n39_3 #39:pri*nt n39_3->n107_43 n48_1 #48:player_match_result n39_3->n48_1 n20_20 #20:match_player n39_3->n20_20 n43_21 #43:readable n39_3->n43_21 n39_4 #39:message_with_headers n39_3->n39_4 n39_4->n43_26 n39_4->n43_21 n38_12 #38:make_message n39_4->n38_12 n43_23 #43:text n39_4->n43_23 n39_5 #39:subj*ect: n39_5->n107_43 n43_27 #43:loaded n39_5->n43_27 n43_55 #43:nothing_loaded_msg n39_5->n43_55 n39_6 #39:set_subject n39_5->n39_6 n39_6->n43_26 n39_6->n43_18 n39_8 #39:to*: n39_8->n39_12 n39_8->n39_11 n39_8->n107_43 n39_8->n43_27 n39_8->n43_55 n39_8->n43_18 n39_9 #39:also*-to: n39_9->n39_12 n39_9->n39_11 n39_9->n107_43 n39_9->n43_27 n39_9->n43_55 n39_9->n43_18 n39_10 #39:not-to*: n39_10->n39_12 n39_10->n107_43 n39_10->n43_27 n39_10->n43_55 n39_10->n43_18 n39_10->n45_5 n39_10->n38_10 n20_16 #20:literal_object n39_10->n20_16 n20_17 #20:match n39_10->n20_17 n39_13 #39:make_message n39_13->n38_12 n39_16 #39:check_answer_flags n39_16->n39_11 n39_16->n107_43 n20_38 #20:explode n39_16->n20_38 n39_17 #39:reply-to*: n39_17->n39_11 n39_17->n107_43 n39_17->n43_27 n39_17->n43_55 n39_17->n43_18 n39_17->n38_14 n39_18 #39:send n39_18->n39_7 n39_18->n39_4 n39_18->n43_27 n39_18->n43_55 n39_18->n43_18 n39_18->n38_14 n6_9 #6:notify n39_18->n6_9 n38_3 #38:raw_send n39_18->n38_3

Showing 48 of 66 verbs; 18 not shown.

Source

working_on

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1return this:ok(who = args[1]) && tostr("a letter ", this:sending(who) ? "(in transit) " | "", "to ", this:recipient_names(who), (subject = `this.subjects[who] ! ANY') && tostr(" entitled \"", subject, "\""));

parse_invoke

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1"invoke(rcptstrings,verb[,subject]) for a @send";
2"invoke(1,verb,rcpts,subject,replyto,body) if no parsing is needed";
3"invoke(2,verb,msg,flags,replytos) for an @answer";
4if (!(which = args[1]))
5player:tell_lines({tostr("Usage:  ", args[2], " <list-of-recipients>"), tostr("        ", args[2], "                      to continue with a previous draft")});
6elseif (typeof(which) == LIST)
7"...@send...";
8if (rcpts = this:parse_recipients({}, which))
9if (replyto = player:mail_option("replyto"))
10replyto = this:parse_recipients({}, replyto, ".mail_options: ");
11endif
12if (0 == (subject = {@args, 0}[3]))
13if (player:mail_option("nosubject"))
14subject = "";
15else
16player:tell("Subject:");
17subject = $command_utils:read();
18endif
19endif
20return {rcpts, subject, replyto, {}};
21endif
22elseif (which == 1)
23return args[3..6];
24elseif (!(to_subj = this:parse_msg_headers(msg = args[3], flags = args[4])))
25else
26include = {};
27if ("include" in flags)
28prefix = ">            ";
29for line in ($mail_agent:to_text(@msg))
30if (!line)
31prefix = ">  ";
32include = {@include, prefix};
33else
34include = {@include, @this:fill_string(">  " + line, 70, prefix)};
35endif
36endfor
37endif
38return {@to_subj, args[5], include};
39endif
40return 0;

init_session

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1{who, recip, subj, replyto, msg} = args;
2if (this:ok(who))
3this.sending[who] = 0;
4this.recipients[who] = recip;
5this.subjects[who] = subj;
6this.replytos[who] = replyto || {};
7this:load(who, msg);
8this.active[who]:tell("Composing ", this:working_on(who));
9p = this.active[who];
10"if (p:mail_option(\"enter\") && !args[5])";
11"Changed from above so that @reply can take advantage of @mailoption +enter. Ho_Yan 11/9/94";
12if (p:mail_option("enter"))
13if (typeof(lines = $command_utils:read_lines()) == ERR)
14p:tell(lines);
15else
16this:insert_line(p in this.active, lines, 0);
17endif
18endif
19endif

pri*nt

Spec any none noneFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!dobjstr)
2plyr = player;
3elseif ($command_utils:player_match_result(plyr = $string_utils:match_player(dobjstr), dobjstr)[1])
4return;
5endif
6if ((plyr != player) && (!this:readable(plyr in this.active)))
7player:tell(plyr.name, "(", plyr, ") has not published anything here.");
8elseif (typeof(msg = this:message_with_headers(plyr in this.active)) != LIST)
9player:tell(msg);
10else
11player:display_message({((plyr == player) ? "Your" | tostr(plyr.name, "(", plyr, ")'s")) + " message so far:", ""}, player:msg_text(@msg));
12endif

message_with_headers

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1return (this:readable(who = args[1]) || this:ok(who)) && $mail_agent:make_message(this.active[who], this.recipients[who], {this.subjects[who], this.replytos[who]}, this:text(who));

subj*ect:

Spec any any anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!(who = this:loaded(player)))
2player:tell(this:nothing_loaded_msg());
3elseif (!argstr)
4player:tell(this.subjects[who]);
5elseif (ERR == typeof(subj = this:set_subject(who, argstr)))
6player:tell(subj);
7else
8player:tell(subj ? ("Setting the subject line for your message to \"" + subj) + "\"." | "Deleting the subject line for your message.");
9endif

set_subject

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1if (!(fuckup = this:ok(who = args[1])))
2return fuckup;
3else
4this.subjects[who] = subj = args[2];
5this:set_changed(who, 1);
6return subj;
7endif

sending

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1if (!(fuckup = this:ok(who = args[1])))
2return fuckup;
3elseif ((!(task = this.sending[who])) || $code_utils:task_valid(task))
4return task;
5else
6"... uh oh... sending task crashed...";
7this:set_changed(who, 1);
8return this.sending[who] = 0;
9endif

to*:

Spec any any anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!(who = this:loaded(player)))
2player:tell(this:nothing_loaded_msg());
3elseif (!args)
4player:tell("Your message is currently to ", this:recipient_names(who), ".");
5else
6this.recipients[who] = this:parse_recipients({}, args);
7this:set_changed(who, 1);
8player:tell("Your message is now to ", this:recipient_names(who), ".");
9endif

also*-to: cc*:

Spec any any anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!(who = this:loaded(player)))
2player:tell(this:nothing_loaded_msg());
3else
4this.recipients[who] = this:parse_recipients(this.recipients[who], args);
5this:set_changed(who, 1);
6player:tell("Your message is now to ", this:recipient_names(who), ".");
7endif

not-to*: uncc*:

Spec any any anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!(who = this:loaded(player)))
2player:tell(this:nothing_loaded_msg());
3else
4recips = this.recipients[who];
5nonmrs = {};
6mrs = {};
7for o in (recips)
8if ($object_utils:isa(o, $mail_recipient))
9mrs = {@mrs, o};
10else
11nonmrs = {@nonmrs, o};
12endif
13endfor
14for a in (args)
15if (!a)
16player:tell("\"\"?");
17return;
18elseif (valid(aobj = $mail_agent:match_recipient(a)) && (aobj in recips))
19elseif ($failed_match != (aobj = $string_utils:literal_object(a)))
20if (!(aobj in recips))
21player:tell(aobj, " was not a recipient.");
22return;
23endif
24elseif ((a[1] == "*") && valid(aobj = $string_utils:match(a[2..$], mrs, "aliases")))
25elseif ((a[1] != "*") && valid(aobj = $string_utils:match(a, nonmrs, "aliases")))
26elseif (valid(aobj = $string_utils:match(a, recips, "aliases")))
27else
28player:tell("couldn't find \"", a, "\" in To: list.");
29return;
30endif
31recips = setremove(recips, aobj);
32endfor
33this.recipients[who] = recips;
34this:set_changed(who, 1);
35player:tell("Your message is now to ", this:recipient_names(who), ".");
36endif

parse_recipients

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1"parse_recipients(prev_list,list_of_strings) -- parses list of strings and adds any resulting player objects to prev_list.  Optional 3rd arg is prefixed to any mismatch error messages";
2{recips, l, ?cmd_id = ""} = args;
3cmd_id = cmd_id || "";
4for s in ((typeof(l) == LIST) ? l | {l})
5if (typeof(s) != STR)
6if ($mail_agent:is_recipient(s))
7recips = setadd(recips, s);
8else
9player:tell(cmd_id, s, " is not a valid mail recipient.");
10endif
11elseif (!$mail_agent:match_failed(md = $mail_agent:match_recipient(s), s, cmd_id))
12recips = setadd(recips, md);
13endif
14endfor
15return recips;

recipient_names

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1return this:ok(who = args[1]) && $mail_agent:name_list(@this.recipients[who]);

make_message

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1return $mail_agent:make_message(@args);

name_list

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1"(obsolete verb... see $mail_agent:name_list)";
2return $mail_agent:(verb)(@args[1]);

parse_msg_headers

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1"parse_msg_headers(msg,flags)";
2"  parses msg to extract reply recipients and construct a subject line";
3"  if the \"all\" flag is present, reply goes to all of the original recipients";
4"  returns a list {recipients, subjectline} or 0 in case of error.";
5{msg, flags} = args;
6replyall = "all" in flags;
7objects = {};
8if ("followup" in flags)
9"...look for first non-player recipient in To: line...";
10for o in ($mail_agent:parse_address_field(msg[3]))
11if (objects)
12break o;
13elseif ($object_utils:isa(o, $mail_recipient))
14objects = {o};
15endif
16endfor
17endif
18objects = objects || $mail_agent:parse_address_field(msg[2] + (replyall ? msg[3] | ""));
19for line in (msg[5..("" in {@msg, ""}) - 1])
20if (rt = index(line, "Reply-to:") == 1)
21objects = $mail_agent:parse_address_field(line);
22endif
23endfor
24recips = {};
25for o in (objects)
26if (o == #0)
27player:tell("Sorry, but I can't parse the header of that message.");
28return 0;
29elseif ((!valid(o)) || (!(is_player(o) || ($mail_recipient in $object_utils:ancestors(o)))))
30player:tell(o, " is no longer a valid player or maildrop; ignoring that recipient.");
31elseif (o != player)
32recips = setadd(recips, o);
33endif
34endfor
35subject = msg[4];
36if (subject == " ")
37subject = "";
38elseif (subject && (index(subject, "Re: ") != 1))
39subject = "Re: " + subject;
40endif
41return {recips, subject};

check_answer_flags

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

Source

1flags = {};
2for o in ({"all", "include", "followup"})
3if (player:mail_option(o))
4flags = {@flags, o};
5endif
6endfor
7reply_to = player:mail_option("replyto") || {};
8flaglist = "+1#include -1#noinclude +2#all -2#sender 0#replyto +3#followup ";
9for a in (args)
10if (i = index(a, "="))
11value = a[i + 1..$];
12a = a[1..i - 1];
13else
14value = "";
15endif
16if ((typeof(a) != STR) || ((i = index(flaglist, "#" + a)) < 3))
17player:tell("Unrecognized answer/reply option:  ", a);
18return 0;
19elseif (i != rindex(flaglist, "#" + a))
20player:tell("Ambiguous answer/reply option:  ", a);
21return 0;
22elseif (j = index("0123456789", flaglist[i - 1]) - 1)
23if (value)
24player:tell("Flag does not take a value:  ", a);
25return 0;
26endif
27f = {"include", "all", "followup"}[j];
28flags = (flaglist[i - 2] == "+") ? setadd(flags, f) | setremove(flags, f);
29if (f == "all")
30flags = setremove(flags, "followup");
31endif
32elseif ((!value) || (value = this:parse_recipients({}, $string_utils:explode(value), "replyto flag:  ")))
33reply_to = value || {};
34endif
35endfor
36return {flags, reply_to};

reply-to*: replyto*:

Spec any any anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!(who = this:loaded(player)))
2player:tell(this:nothing_loaded_msg());
3else
4if (args)
5this.replytos[who] = rt = this:parse_recipients({}, args);
6this:set_changed(who, 1);
7else
8rt = this.replytos[who];
9endif
10player:tell(rt ? ("Replies will go to " + $mail_agent:name_list(@this.replytos[who])) + "." | "Reply-to field is empty.");
11endif

send

Spec none none noneFlags rxdOwner #361Definer #39

Referenced by

none

Source

1"WIZARDLY";
2if (!(who = this:loaded(player)))
3player:notify(this:nothing_loaded_msg());
4elseif (!(recips = this.recipients[who]))
5player:notify("Umm... your message isn't addressed to anyone.");
6elseif (this:sending(who))
7player:notify("Again? ... relax... it'll get there eventually.");
8else
9msg = this:message_with_headers(who);
10this.sending[who] = old_sending = task_id();
11this:set_changed(who, 0);
12player:notify("Sending...");
13"... this sucker can suspend BIG TIME...";
14result = $mail_agent:raw_send(msg, recips, player);
15"... the world changes...";
16who = player in this.active;
17if (who && (this.sending[who] == old_sending))
18"... same editing session; no problemo...";
19previous = "";
20this.sending[who] = 0;
21else
22"... uh oh, different session... tiptoe quietly out...";
23"... Don't mess with the session.";
24previous = "(prior send) ";
25endif
26if (!(e = result[1]))
27player:notify(tostr(previous, (typeof(e) == ERR) ? e | ("Bogus recipients:  " + $string_utils:from_list(result[2]))));
28player:notify(tostr(previous, "Mail not sent."));
29previous || this:set_changed(who, 1);
30elseif (length(result) == 1)
31player:notify(tostr(previous, "Mail not actually sent to anyone."));
32previous || this:set_changed(who, 1);
33else
34player:notify(tostr(previous, "Mail actually sent to ", $mail_agent:name_list(@listdelete(result, 1))));
35if (previous)
36"...don't even think about it...";
37elseif (player.location == this)
38if (ticks_left() < 10000)
39suspend(0);
40endif
41this:done();
42elseif (!this:changed(who))
43"... player is gone, no further edits...";
44this:kill_session(who);
45endif
46endif
47endif

who

Spec any none noneFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (dobjstr)
2if (!(recips = this:parse_recipients({}, args)))
3"parse_recipients has already complained about anything it doesn't like";
4return;
5endif
6elseif (caller != player)
7return E_PERM;
8elseif (!(who = this:loaded(player)))
9player:tell(this:nothing_loaded_msg());
10return;
11else
12recips = this.recipients[who];
13endif
14resolve = $mail_agent:resolve_addr(recips, player);
15if (resolve[1])
16player:tell("Bogus addresses:  ", $string_utils:english_list(resolve[1]));
17else
18player:tell(dobjstr ? ("Mail to " + $mail_agent:name_list(@recips)) + " actually goes to " | "Your mail will actually go to ", $mail_agent:name_list(@resolve[2]));
19endif

showlists

Spec any none noneFlags rxdOwner #29Definer #39

Referenced by

none

Source

1player:tell_lines({"Available aliases:", ""});
2for c in ((dobjstr == "all") ? $object_utils:descendants($mail_recipient) | $mail_agent.contents)
3if (c:is_usable_by(player) || c:is_readable_by(player))
4c:look_self();
5endif
6endfor

subsc*ribe

Spec any at/to anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1player:tell("This command is obsolete.  Use @subscribe instead.  See `help @subscribe'");
2return;
3if (!iobjstr)
4player:tell("Usage:  ", verb, " [<list-of-people/lists>] to <list>");
5return;
6elseif ($mail_agent:match_failed(iobj = $mail_agent:match(iobjstr), iobjstr))
7return;
8endif
9rstrs = dobjstr ? $string_utils:explode(dobjstr) | {"me"};
10recips = this:parse_recipients({}, rstrs);
11outcomes = iobj:add_forward(@recips);
12if (typeof(outcomes) != LIST)
13player:tell(outcomes);
14return;
15endif
16added = {};
17for r in [1..length(recips)]
18if ((t = typeof(e = outcomes[r])) == OBJ)
19added = setadd(added, recips[r]);
20else
21player:tell(verb, " ", recips[r].name, " to ", iobj.name, ":  ", e);
22endif
23endfor
24if (added)
25player:tell($string_utils:english_list($list_utils:map_arg(2, $string_utils, "pronoun_sub", "%(name) (%#)", added)), " added to ", iobj.name, " (", iobj, ")");
26endif

unsubsc*ribe

Spec any out of/from inside/from anyFlags rxdOwner #29Definer #39

Referenced by

none

Source

1if (!iobjstr)
2player:tell("Usage:  ", verb, " [<list-of-people/lists>] from <list>");
3return;
4elseif ($mail_agent:match_failed(iobj = $mail_agent:match(iobjstr), iobjstr))
5return;
6endif
7rstrs = dobjstr ? $string_utils:explode(dobjstr) | {"me"};
8recips = this:parse_recipients({}, rstrs);
9outcomes = iobj:delete_forward(@recips);
10if (typeof(outcomes) != LIST)
11player:tell(outcomes);
12return;
13endif
14removed = {};
15for r in [1..length(recips)]
16if (typeof(e = outcomes[r]) == ERR)
17player:tell(verb, " ", recips[r].name, " from ", iobj.name, ":  ", (e == E_INVARG) ? "Not on list." | e);
18else
19removed = setadd(removed, recips[r]);
20endif
21endfor
22if (removed)
23player:tell($string_utils:english_list($list_utils:map_arg(2, $string_utils, "pronoun_sub", "%(name) (%#)", removed)), " removed from ", iobj.name, " (", iobj, ")");
24endif

retain_session_on_exit

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1return this:ok(who = args[1]) && (this:sending(who) || pass(@args));

no_littering_msg

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1"recall that this only gets called if :retain_session_on_exit returns true";
2return (this:ok(who = player in this.active) && (!this:changed(who))) ? {"Your message is in transit."} | this.(verb);

parse_msg_headers(slow)

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1"parse_msg_headers(msg,flags)";
2"  parses msg to extract reply recipients and construct a subject line";
3"  if the \"all\" flag is present, reply goes to all of the original recipients";
4"  returns a list {recipients, subjectline} or 0 in case of error.";
5msg = args[1];
6replyall = "all" in args[2];
7recipients = $mail_agent:parse_address_field(msg[2] + (replyall ? msg[3] | ""));
8subject = msg[4];
9if (subject == " ")
10subject = "";
11endif
12noreplyto = 1;
13for line in (msg[1..("" in msg) || length(msg)])
14if (typeof(line) != STR)
15"Skip it";
16elseif (index(line, "Subject:") == 1)
17subject = $string_utils:triml(line[9..length(line)]);
18elseif ((rt = index(line, "Reply-to:") == 1) || (noreplyto && ((index(line, "From:") == 1) || (replyall && (index(line, "To:") == 1)))))
19if (rt)
20noreplyto = 0;
21recipients = {};
22endif
23recipients = {@recipients, @$mail_agent:parse_address_field(line)};
24endif
25endfor
26if (subject && (index(subject, "Re: ") != 1))
27subject = "Re: " + subject;
28endif
29recips = {};
30for o in (recipients)
31if (o == #0)
32player:tell("Sorry, but I can't parse the header of that message.");
33return 0;
34elseif ((!valid(o)) || (!(is_player(o) || ($mail_recipient in $object_utils:ancestors(o)))))
35player:tell(o, " is no longer a valid player or maildrop; ignoring that recipient.");
36elseif (o != player)
37recips = setadd(recips, o);
38endif
39endfor
40return {recips, subject};

local_editing_info

Spec this none thisFlags rxdOwner #29Definer #39

Referenced by

none

Source

1lines = {"To:       " + (toline = $mail_agent:name_list(@args[1])), "Subject:  " + $string_utils:trim(subject = args[2])};
2if (args[3])
3lines = {@lines, "Reply-to: " + $mail_agent:name_list(@args[3])};
4endif
5lines = {@lines, "", @args[4]};
6return {tostr("MOOMail", subject ? ("(" + subject) + ")" | (("-to(" + toline) + ")")), lines, "@@sendmail"};