New-Prog-Log #29

Parent #45Owner #2Flags Source RPG Core/rpgcore-patched.db

Aliases: New-Prog-Log, New_Prog_Log, NPL

7 verbs · 24 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
init_for_corethis none thisrxd#2914
receive_messagethis none thisrxd#2921
display_seq_headers display_seq_fullthis none thisrxd#2930
from_msg_seqthis none thisrxd#2924
to_msg_seqthis none thisrxd#2923
%to_msg_seq subject_msg_seqthis none thisrxd#2924
%from_msg_seqthis none thisrxd#291

Properties

PropertyDefinerFlagsOwnerValue
keyword#29rc#2"PROGRAMMER"
moderator_notify#45rc#2<clear>
last_msg_date#45r#360
messages_going#45rc#36{}
moderated#45rc#21
moderator_forward#45rc#2<clear>
writers#45rc#2<clear>
readers#45rc#2<clear>
mail_notify#45r#36{#2}
mail_forward#45r#36{}
expire_period#45r#36<clear>
last_used_time#45r#36<clear>
messages#45rc#36{}
rmm_own_msgs#45rc#2<clear>
guests_can_send_here#45rc#2<clear>
messages_kept#45r#36{}
registered_email#45rc#36<clear>
email_validated#45rc#36<clear>
validation_password#45rc#36<clear>
key#1c#2<clear>
aliases#1r#36{"New-Prog-Log", "New_Prog_Log", "NPL"}
description#1rc#2"Record of who's been made a @programmer."
object_size#1r#36{7000, -1090650497}
html#1rc#2<clear>

Ancestry

Ancestors (nearest first): #45 Generic Mail Recipient#1 Root Class

Children: #89 Password-Change-Log

Call graph

calls n29_0 #29:init_for_core n45_27 #45:init_for_core n29_0->n45_27 n45_17 #45:rm_message_seq n29_0->n45_17 n45_15 #45:parse_message_seq n29_0->n45_15 n45_18 #45:undo_rmm n29_0->n45_18 n29_1 #29:receive_message n45_2 #45:is_writable_by n29_1->n45_2 n29_2 #29:display_seq_headers n29_2->n45_15 n45_13 #45:ok n29_2->n45_13 n6_18 #6:tell n29_2->n6_18 n20_71 #20:redirect_ansi n29_2->n20_71 n45_24 #45:msg_summary_line n29_2->n45_24 n6_85 #6:ctime n29_2->n6_85 n56_8 #56:suspend_if_needed n29_2->n56_8 n29_3 #29:from_msg_seq n29_3->n45_13 n29_3->n56_8 n33_0 #33:add n29_3->n33_0 n20_6 #20:english_list n29_3->n20_6 n55_4 #55:map_arg n29_3->n55_4 n29_4 #29:to_msg_seq n29_4->n45_13 n29_4->n56_8 n29_4->n33_0 n29_4->n20_6 n29_5 #29:%to_msg_seq n29_5->n45_13 n29_5->n56_8 n29_5->n33_0 n29_5->n20_6

Source

init_for_core

Spec this none thisFlags rxdOwner #2Definer #29

Referenced by

Source

1if (caller_perms().wizard)
2pass();
3`this:rm_message_seq({1, 1 + this:length_all_msgs()}) ! E_RANGE => ""';
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 #2Definer #29

Referenced by

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][index(m[4], "(") + 1..index(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 #2Definer #29

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
15if (ldate < (time() - 31536000))
16c = player:ctime(ldate);
17date = c[5..11] + c[21..25];
18else
19date = player:ctime(ldate)[5..16];
20endif
21hdr = tostr(ctime(ldate)[5..16], "   ", $string_utils:left(tostr(x[2][4], " (", x[2][3], ")"), 30), valid(w = x[2][2]) ? w.name | "??", " (", x[2][2], ")");
22endif
23player:tell(msgnum, (ldate > read_date) ? ":+ " | ":  ", hdr);
24$command_utils:suspend_if_needed(0);
25endfor
26if (verb == "display_seq_full")
27return {last, ldate};
28else
29player:tell("----+");
30endif

from_msg_seq

Spec this none thisFlags rxdOwner #2Definer #29

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 #2Definer #29

Referenced by

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 #2Definer #29

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 #2Definer #29

Referenced by

none

Source

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