New-Prog-Log #29
Aliases: New-Prog-Log, New_Prog_Log, NPL
7 verbs · 23 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
init_for_core | this none this | rxd | #29 | 14 |
receive_message | this none this | rxd | #29 | 21 |
display_seq_headers display_seq_full | this none this | rxd | #29 | 30 |
from_msg_seq | this none this | rxd | #29 | 24 |
to_msg_seq | this none this | rxd | #29 | 23 |
%to_msg_seq subject_msg_seq | this none this | rxd | #29 | 24 |
%from_msg_seq | this none this | rxd | #29 | 1 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
keyword | #29 | rc | #2 | "PROGRAMMER" |
moderator_notify | #45 | rc | #2 | <clear> |
last_msg_date | #45 | r | #36 | 1538781269 |
messages_going | #45 | rc | #36 | {} |
moderated | #45 | rc | #2 | 1 |
moderator_forward | #45 | rc | #2 | <clear> |
writers | #45 | rc | #2 | <clear> |
readers | #45 | rc | #2 | <clear> |
mail_notify | #45 | r | #36 | {#2} |
mail_forward | #45 | r | #36 | {} |
expire_period | #45 | r | #36 | <clear> |
last_used_time | #45 | r | #36 | 1538781269 |
messages | #45 | rc | #36 | {} |
rmm_own_msgs | #45 | rc | #2 | <clear> |
guests_can_send_here | #45 | rc | #2 | <clear> |
messages_kept | #45 | r | #36 | {} |
registered_email | #45 | rc | #36 | <clear> |
email_validated | #45 | rc | #36 | <clear> |
validation_password | #45 | rc | #36 | <clear> |
key | #1 | c | #2 | <clear> |
aliases | #1 | r | #36 | {"New-Prog-Log", "New_Prog_Log", "NPL"} |
description | #1 | rc | #2 | "Record of who's been made a @programmer." |
object_size | #1 | r | #36 | {6321, 1539462952} |
Ancestry
Ancestors (nearest first): #45 Generic Mail Recipient → #1 Root Class
Children: #89 Password-Change-Log
Call graph
Source
init_for_core
Referenced by
- #89:init_for_core line 2:
pass(
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
Referenced by
- #89:receive_message line 8:
pass(
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
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
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
Referenced by
- #89:to_msg_seq line 7:
pass(
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
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
Referenced by
none
Source
1return this.name + " doesn't understand %%from:";