New-Prog-Log #23

Parent #37Owner #361Flags readSource hellcore/hellcore.db

Aliases: New-Prog-Log, New_Prog_Log, NPL

7 verbs · 32 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
init_for_corethis none thisrxd#2314
receive_messagethis none thisrxd#2321
display_seq_headers display_seq_fullthis none thisrxd#2325
from_msg_seqthis none thisrxd#2324
to_msg_seqthis none thisrxd#2323
%to_msg_seq subject_msg_seqthis none thisrxd#2324
%from_msg_seqthis none thisrxd#231

Properties

PropertyDefinerFlagsOwnerValue
keyword#23rc#361"PROGRAMMER"
moderator_notify#37rc#361<clear>
last_msg_date#37r#290
messages_going#37#29{}
moderated#37rc#3611
moderator_forward#37rc#361<clear>
writers#37rc#361<clear>
readers#37rc#361<clear>
mail_notify#37r#29{#661362}
mail_forward#37r#29{}
expire_period#37r#29<clear>
last_used_time#37r#291311908486
messages#37#29{}
rmm_own_msgs#37rc#361<clear>
guests_can_send_here#37rc#361<clear>
messages_kept#37r#29{}
registered_email#37#29<clear>
email_validated#37#29<clear>
validation_password#37#29<clear>
barcolor#37rc#361"red"
hidden_subjects#37rc#361<clear>
hidden_content#37rc#361<clear>
aliases#1r#29{"New-Prog-Log", "New_Prog_Log", "NPL"}
description#1rc#361"Record of who's been made a @programmer."
object_size#1r#29{20696, 1298433815}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #37 Generic Mail Recipient#1 root

Children: none

Call graph

calls n23_0 #23:init_for_core n37_27 #37:init_for_core n23_0->n37_27 n37_17 #37:rm_message_seq n23_0->n37_17 n37_15 #37:parse_message_seq n23_0->n37_15 n37_18 #37:undo_rmm n23_0->n37_18 n23_1 #23:receive_message n37_2 #37:is_writable_by n23_1->n37_2 n23_2 #23:display_seq_headers n23_2->n37_15 n37_13 #37:ok n23_2->n37_13 n107_43 #107:tell n23_2->n107_43 n20_1 #20:left n23_2->n20_1 n20_2 #20:right n23_2->n20_2 n37_24 #37:msg_summary_line n23_2->n37_24 n35_18 #35:abbrev_ctime n23_2->n35_18 n48_8 #48:suspend_if_needed n23_2->n48_8 n23_3 #23:from_msg_seq n23_3->n37_13 n23_3->n48_8 n27_0 #27:add n23_3->n27_0 n20_6 #20:english_list n23_3->n20_6 n23_4 #23:to_msg_seq n23_4->n37_13 n23_4->n48_8 n23_4->n27_0 n23_4->n20_6 n23_5 #23:%to_msg_seq n23_5->n37_13 n23_5->n48_8 n23_5->n27_0 n23_5->n20_6

Source

init_for_core

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1if (caller_perms().wizard)
2pass();
3this:rm_message_seq({1, 1 + this:length_all_msgs()});
4this:expunge_rmm();
5this.mail_forward = {};
6this.mail_notify = {player};
7player.current_message = {@player.current_message, {this, 0, 0}};
8for p in ({"moderator_forward", "writers", "readers", "expire_period", "last_used_time"})
9clear_property(this, p);
10endfor
11this.moderated = 1;
12else
13return E_PERM;
14endif

receive_message

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1if (!this:is_writable_by(caller_perms()))
2return E_PERM;
3else
4if (msgs = this.messages)
5new = msgs[$][1] + 1;
6else
7new = 1;
8endif
9if (rmsgs = this.messages_going)
10lbrm = rmsgs[$][2];
11new = max(new, lbrm[$][1] + 1);
12endif
13m = args[1];
14if (index(m[4], "@programmer ") == 1)
15m = {m[1], toobj(args[2]), o = toobj(m[4][rindex(m[4], "(") + 1..rindex(m[4], ")") - 1]), o.name};
16endif
17this.messages = {@msgs, {new, m}};
18this.last_msg_date = m[1];
19this.last_used_time = time();
20return new;
21endif

display_seq_headers display_seq_full

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1":display_seq_headers(msg_seq[,cur])";
2":display_seq_full(msg_seq[,cur]) => {cur}";
3if (!this:ok(caller, caller_perms()))
4return E_PERM;
5endif
6{msg_seq, ?cur = 0, ?read_date = $maxint} = args;
7last = ldate = 0;
8player:tell("       WHEN           ", $string_utils:left(this.keyword, -30), "BY");
9for x in (msgs = this:messages_in_seq(args[1]))
10msgnum = $string_utils:right(last = x[1], 4, (cur == x[1]) ? ">" | " ");
11ldate = x[2][1];
12if (typeof(x[2][2]) != OBJ)
13hdr = this:msg_summary_line(@x[2]);
14else
15datestr = $su:right($time_utils:abbrev_ctime(ldate), 11);
16hdr = tostr(datestr, "   ", $string_utils:left(tostr(x[2][4], " (", x[2][3], ")"), 30), valid(w = x[2][2]) ? w.name | "??", " (", x[2][2], ")");
17endif
18player:tell(msgnum, (ldate > read_date) ? ":+ " | ":  ", hdr);
19$command_utils:suspend_if_needed(0);
20endfor
21if (verb == "display_seq_full")
22return {last, ldate};
23else
24player:tell("----+");
25endif

from_msg_seq

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1":from_msg_seq(object or list[,mask])";
2" => msg_seq of messages from any of these senders";
3if (!this:ok(caller, caller_perms()))
4return E_PERM;
5endif
6{plist, ?mask = {1}} = args;
7if (typeof(plist) != LIST)
8plist = {plist};
9endif
10i = 1;
11fseq = {};
12for msg in (this.messages)
13if ((!mask) || (i < mask[1]))
14elseif ((length(mask) < 2) || (i < mask[2]))
15if (msg[2][2] in plist)
16fseq = $seq_utils:add(fseq, i, i);
17endif
18else
19mask = mask[3..$];
20endif
21i = i + 1;
22$command_utils:suspend_if_needed(0);
23endfor
24return fseq || ("%f %<has> no messages from " + $string_utils:english_list($list_utils:map_arg(2, $string_utils, "pronoun_sub", "%n (%#)", plist), "no one", " or "));

to_msg_seq

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1":to_msg_seq(object or list[,mask]) => msg_seq of messages to those people";
2if (!this:ok(caller, caller_perms()))
3return E_PERM;
4endif
5{plist, ?mask = {1}} = args;
6if (typeof(plist) != LIST)
7plist = {plist};
8endif
9i = 1;
10fseq = {};
11for msg in (this.messages)
12if ((!mask) || (i < mask[1]))
13elseif ((length(mask) < 2) || (i < mask[2]))
14if (msg[2][3] in plist)
15fseq = $seq_utils:add(fseq, i, i);
16endif
17else
18mask = mask[3..$];
19endif
20i = i + 1;
21$command_utils:suspend_if_needed(0);
22endfor
23return fseq || ("%f %<has> no messages about @programmer'ing " + $string_utils:english_list(plist, "no one", " or "));

%to_msg_seq subject_msg_seq

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1":%to_msg_seq/subject_msg_seq(string or list of strings[,mask])";
2" => msg_seq of messages containing one of strings in the to line";
3if (!this:ok(caller, caller_perms()))
4return E_PERM;
5endif
6{nlist, ?mask = {1}} = args;
7if (typeof(nlist) != LIST)
8nlist = {nlist};
9endif
10i = 1;
11fseq = {};
12for msg in (this.messages)
13if ((!mask) || (i < mask[1]))
14elseif ((length(mask) < 2) || (i < mask[2]))
15if (msg[2][4] in nlist)
16fseq = $seq_utils:add(fseq, i, i);
17endif
18else
19mask = mask[3..$];
20endif
21i = i + 1;
22$command_utils:suspend_if_needed(0);
23endfor
24return fseq || ("%f %<has> no messages about @programmer'ing " + $string_utils:english_list(nlist, "no one", " or "));

%from_msg_seq

Spec this none thisFlags rxdOwner #361Definer #23

Referenced by

none

Source

1return this.name + " doesn't understand %%from:";