Generic Mail Recipient #45
Aliases: Generic Mail Recipient
38 verbs · 23 properties · 5 children
Verbs
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
moderator_notify | #45 | rc | #36 | {} |
last_msg_date | #45 | r | #36 | 0 |
messages_going | #45 | | #36 | {} |
moderated | #45 | rc | #36 | {} |
moderator_forward | #45 | rc | #36 | "%n (%#) can't send to moderated list %t (%[#t]) directly." |
writers | #45 | rc | #36 | {} |
readers | #45 | rc | #36 | {} |
mail_notify | #45 | r | #36 | {} |
mail_forward | #45 | r | #36 | "%t (%[#t]) is a generic recipient." |
expire_period | #45 | r | #36 | 2592000 |
last_used_time | #45 | r | #36 | 0 |
messages | #45 | | #36 | {} |
rmm_own_msgs | #45 | rc | #36 | 1 |
guests_can_send_here | #45 | rc | #36 | 0 |
messages_kept | #45 | r | #36 | {} |
registered_email | #45 | | #36 | "" |
email_validated | #45 | | #36 | 1 |
validation_password | #45 | | #36 | "" |
key | #1 | c | #36 | <clear> |
aliases | #1 | r | #36 | {"Generic Mail Recipient"} |
description | #1 | rc | #36 | "This can either be a mailing list or a mail folder, depending on what mood you're in..." |
object_size | #1 | r | #36 | {33039, -1090650497} |
html | #1 | rc | #36 | <clear> |
Ancestry
Ancestors (nearest first): #1 Root Class
Children: #14 Generic Large-Capacity Mail Recipient, #29 New-Prog-Log, #34 Quota-Log, #61 News, #70 Site-Locks
Call graph
Showing 48 of 70 verbs; 22 not shown.
Source
set_aliases
Referenced by
none
Source
1"For changing mailing list aliases, we check to make sure that none of the aliases match existing mailing list aliases. Aliases containing spaces are not used in addresses and so are not subject to this restriction ($mail_agent:match will not match on them, however, so they only match if used in the immediate room, e.g., with match_object() or somesuch)."; 2" => E_PERM if you don't own this"; 3if ((caller != this) && (!$perm_utils:controls(caller_perms(), this))) 4return E_PERM; 5elseif (this.location != $mail_agent) 6"... we don't care..."; 7return pass(@args); 8else 9{newaliases} = args; 10for a in (aliases = newaliases) 11if (index(a, " ")) 12"... we don't care..."; 13elseif (rp = $mail_agent:reserved_pattern(a)) 14player:tell("Mailing list name \"", a, "\" uses a reserved pattern: ", rp[1]); 15aliases = setremove(aliases, a); 16elseif (valid(p = $mail_agent:match(a, $nothing)) && ((p != this) && (a in p.aliases))) 17player:tell("Mailing list name \"", a, "\" in use on ", p.name, "(", p, ")"); 18aliases = setremove(aliases, a); 19endif 20endfor 21return pass(aliases) && (newaliases == aliases); 22endif
look_self
Referenced by
none
Source
1"Returns full name and mail aliases for this list, read and write status by the player, and a short description. Calling :look_self(1) will omit the description."; 2{?brief = 0} = args; 3namelist = "*" + ((names = this:mail_names()) ? $string_utils:from_list(names, ", *") | tostr(this)); 4if (typeof(fwd = this:mail_forward()) != LIST) 5fwd = {}; 6endif 7if (this:is_writable_by(player)) 8if (player in fwd) 9read = " [Writable/Subscribed]"; 10else 11read = " [Writable]"; 12endif 13elseif (this.readers == 1) 14read = tostr(" [Public", (player in fwd) ? "/Subscribed]" | "]"); 15elseif (player in fwd) 16read = " [Subscribed]"; 17elseif (this:is_readable_by(player)) 18read = " [Readable]"; 19else 20read = ""; 21endif 22if (this:is_usable_by($no_one)) 23mod = ""; 24elseif (this:is_usable_by(player)) 25mod = " [Approved]"; 26else 27mod = " [Moderated]"; 28endif 29player:tell(namelist, " (", this, ")", read, mod); 30if (!brief) 31d = this:description(); 32if (typeof(d) == STR) 33d = {d}; 34endif 35for l in (d) 36if (length(l) <= 75) 37ls = {l}; 38else 39ls = $generic_editor:fill_string(l, 76); 40endif 41for line in (ls) 42player:tell(" ", line); 43$command_utils:suspend_if_needed(0); 44endfor 45endfor 46endif
is_writable_by
Referenced by
- #14:receive_batch line 1:
this:is_writable_by - #14:receive_message line 1:
this:is_writable_by - #17:is_usable_by line 2:
this:is_writable_by - #29:receive_message line 1:
this:is_writable_by - #45:look_self line 7:
this:is_writable_by - #45:is_readable_by line 1:
this:is_writable_by - #45:is_usable_by line 3:
this:is_writable_by - #45:ok_write line 2:
this:is_writable_by - #45:moveto line 1:
this:is_writable_by - #45:moveto line 1:
this:is_writable_by - #45:@set_expire line 10:
this:is_writable_by - #61:is_writable_by line 1:
pass( - #89:receive_message line 4:
this:is_writable_by
Source
1return $perm_utils:controls(who = args[1], this) || `who in this.writers ! E_TYPE';
is_readable_by
Referenced by
- #45:look_self line 17:
this:is_readable_by - #45:add_notify line 11:
this:is_readable_by - #45:ok line 2:
this:is_readable_by
Source
1return (typeof(this.readers) != LIST) || (((who = args[1]) in this.readers) || (this:is_writable_by(who) || $mail_agent:sends_to(1, this, who)));
is_usable_by
Referenced by
- #45:look_self line 22:
this:is_usable_by - #45:look_self line 24:
this:is_usable_by - #45:mail_notify line 1:
this:is_usable_by - #45:mail_forward line 1:
this:is_usable_by
Source
1who = args[1]; 2if (this.moderated) 3return `who in this.moderated ! E_TYPE' || (this:is_writable_by(who) || who.wizard); 4else 5return this.guests_can_send_here || (!$object_utils:isa(who, $guest)); 6endif
mail_notify
Referenced by
none
Source
1if ((args && (!this:is_usable_by(args[1]))) && (!args[1].wizard)) 2return this:moderator_notify(@args); 3else 4return this.(verb); 5endif
mail_forward
Referenced by
- #45:look_self line 4:
this:mail_forward
Source
1if ((args && (!this:is_usable_by(args[1]))) && (!args[1].wizard)) 2return this:moderator_forward(@args); 3elseif (typeof(mf = this.(verb)) == STR) 4return $string_utils:pronoun_sub(mf, @args); 5else 6return mf; 7endif
moderator_forward
Referenced by
- #45:mail_forward line 2:
this:moderator_forward
Source
1if (typeof(mf = this.(verb)) == STR) 2return $string_utils:pronoun_sub(mf, args ? args[1] | $player); 3else 4return mf; 5endif
add_forward
Referenced by
none
Source
1":add_forward(recip[,recip...]) adds new recipients to this list. Returns a string error message or a list of results (recip => success, E_PERM => not allowed, E_INVARG => not a valid recipient, string => other kind of failure)"; 2if (caller == $mail_editor) 3perms = player; 4else 5perms = caller_perms(); 6endif 7result = {}; 8forward_self = (!this.mail_forward) || (this in this.mail_forward); 9for recip in (args) 10if ((!valid(recip)) || ((!is_player(recip)) && (!($mail_recipient in $object_utils:ancestors(recip))))) 11r = E_INVARG; 12elseif ($perm_utils:controls(perms, this) || ((typeof(this.readers) != LIST) && $perm_utils:controls(perms, recip))) 13this.mail_forward = setadd(this.mail_forward, recip); 14r = recip; 15else 16r = E_PERM; 17endif 18result = listappend(result, r); 19endfor 20if ((length(this.mail_forward) > 1) && ($nothing in this.mail_forward)) 21this.mail_forward = setremove(this.mail_forward, $nothing); 22endif 23if (forward_self) 24this.mail_forward = setadd(this.mail_forward, this); 25endif 26return result;
delete_forward
Referenced by
none
Source
1":delete_forward(recip[,recip...]) removes recipients to this list. Returns a list of results (E_PERM => not allowed, E_INVARG => not on list)"; 2if (caller == $mail_editor) 3perms = player; 4else 5perms = caller_perms(); 6endif 7result = {}; 8forward_self = (!this.mail_forward) || (this in this.mail_forward); 9for recip in (args) 10if (!(recip in this.mail_forward)) 11r = E_INVARG; 12elseif (((!valid(recip)) || $perm_utils:controls(perms, recip)) || $perm_utils:controls(perms, this)) 13if (recip == this) 14forward_self = 0; 15endif 16this.mail_forward = setremove(this.mail_forward, recip); 17r = recip; 18else 19r = E_PERM; 20endif 21result = listappend(result, r); 22endfor 23if (!(forward_self || this.mail_forward)) 24this.mail_forward = {$nothing}; 25elseif (this.mail_forward == {this}) 26this.mail_forward = {}; 27endif 28return result;
add_notify
Referenced by
none
Source
1":add_notify(recip[,recip...]) adds new notifiees to this list. Returns a list of results (recip => success, E_PERM => not allowed, E_INVARG => not a valid recipient)"; 2if (caller == $mail_editor) 3perms = player; 4else 5perms = caller_perms(); 6endif 7result = {}; 8for recip in (args) 9if ((!valid(recip)) || (recip == this)) 10r = E_INVARG; 11elseif ($perm_utils:controls(perms, this) || (this:is_readable_by(perms) && $perm_utils:controls(perms, recip))) 12this.mail_notify = setadd(this.mail_notify, recip); 13r = recip; 14else 15r = E_PERM; 16endif 17result = listappend(result, r); 18endfor 19return result;
delete_notify
Referenced by
none
Source
1":delete_notify(recip[,recip...]) removes notifiees from this list. Returns a list of results (E_PERM => not allowed, E_INVARG => not on list)"; 2if (caller == $mail_editor) 3perms = player; 4else 5perms = caller_perms(); 6endif 7result = {}; 8rmthis = 0; 9for recip in (args) 10if (!(recip in this.mail_notify)) 11r = E_INVARG; 12elseif ((!valid(recip)) || ($perm_utils:controls(perms, recip) || $perm_utils:controls(perms, this))) 13if (recip == this) 14rmthis = 1; 15endif 16this.mail_notify = setremove(this.mail_notify, recip); 17r = recip; 18else 19r = E_PERM; 20endif 21result = listappend(result, r); 22endfor 23return result;
receive_message
Referenced by
none
Source
1if (!this:ok_write(caller, caller_perms())) 2return E_PERM; 3else 4this.messages = {@this.messages, {new = this:new_message_num(), args[1]}}; 5this.last_msg_date = args[1][1]; 6this.last_used_time = time(); 7return new; 8endif
ok
Referenced by
- #14:messages_in_seq line 1:
this:ok - #14:display_seq_headers line 4:
this:ok - #14:display_seq_full line 4:
this:ok - #14:list_rmm line 1:
this:ok - #14:rm_message_seq line 2:
this:ok - #14:length_all_msgs line 1:
this:ok - #14:length_num_le line 1:
this:ok - #14:length_date_le line 1:
this:ok - #14:exists_num_eq line 1:
this:ok - #14:new_message_num line 1:
this:ok - #14:from_msg_seq line 3:
this:ok - #14:%from_msg_seq line 3:
this:ok - #14:to_msg_seq line 2:
this:ok - #14:%to_msg_seq line 3:
this:ok - #14:subject_msg_seq line 2:
this:ok - #14:body_msg_seq line 2:
this:ok - #14:length_date_gt line 1:
this:ok - #17:display_seq_headers line 2:
this:ok - #29:display_seq_headers line 3:
this:ok - #29:from_msg_seq line 3:
this:ok - #29:to_msg_seq line 2:
this:ok - #29:%to_msg_seq line 3:
this:ok - #45:parse_message_seq line 24:
this:ok - #45:length_date_gt line 3:
this:ok - #45:rm_message_seq line 6:
this:ok - #45:messages line 4:
this:ok - #89:to_msg_seq line 4:
this:ok
Source
1":ok(caller,callerperms) => true iff caller can do read operations"; 2return (args[1] in {this, $mail_agent}) || (args[2].wizard || this:is_readable_by(args[2]));
ok_write
Referenced by
- #14:undo_rmm line 1:
this:ok_write - #14:expunge_rmm line 1:
this:ok_write - #14:rm_message_seq line 2:
this:ok_write - #14:renumber line 3:
this:ok_write - #14:__fix line 1:
this:ok_write - #17:expire_old_messages line 2:
this:ok_write - #45:receive_message line 1:
this:ok_write - #45:rm_message_seq line 4:
this:ok_write - #45:undo_rmm line 13:
this:ok_write - #45:date_sort line 1:
this:ok_write - #45:__fix line 1:
this:ok_write - #45:expire_old_messages line 1:
this:ok_write - #61:rm_message_seq line 1:
this:ok_write - #61:undo_rmm line 1:
this:ok_write - #61:expunge_rmm line 1:
this:ok_write - #61:set_current_news line 1:
this:ok_write - #61:add_current_news line 1:
this:ok_write - #61:rm_current_news line 1:
this:ok_write - #61:touch line 1:
this:ok_write - #61:add_news line 1:
this:ok_write - #61:rm_news line 1:
this:ok_write
Source
1":ok_write(caller,callerperms) => true iff caller can do write operations"; 2return (args[1] in {this, $mail_agent}) || (args[2].wizard || this:is_writable_by(args[2]));
parse_message_seq from_msg_seq %from_msg_seq to_msg_seq %to_msg_seq subject_msg_seq body_msg_seq kept_msg_seq unkept_msg_seq display_seq_headers display_seq_full messages_in_seq list_rmm new_message_num length_num_le length_date_le length_all_msgs exists_num_eq msg_seq_to_msg_num_list msg_seq_to_msg_num_string
Referenced by
- #6:news line 43:
$news:display_seq_headers - #14:display_seq_headers line 9:
this:kept_msg_seq - #29:init_for_core line 3:
this:length_all_msgs - #29:display_seq_headers line 9:
this:messages_in_seq - #34:init_for_core line 7:
this:length_all_msgs - #45:receive_message line 4:
this:new_message_num - #45:own_messages_filter line 4:
this:from_msg_seq - #45:messages line 7:
this:messages_in_seq - #45:messages line 7:
this:length_all_msgs - #45:messages line 8:
this:exists_num_eq - #45:messages line 11:
this:messages_in_seq - #45:_fix_last_msg_date line 1:
this:length_all_msgs - #45:_fix_last_msg_date line 2:
this:messages_in_seq - #45:expire_old_messages line 10:
this:unkept_msg_seq - #45:expire_old_messages line 10:
this:length_date_le - #45:expire_old_messages line 13:
this:messages_in_seq - #61:set_current_news line 7:
this:messages_in_seq - #61:news_display_seq_full line 7:
this:messages_in_seq - #61:_parse line 3:
this:parse_message_seq - #61:init_for_core line 3:
this:length_all_msgs - #61:@addnews line 13:
this:display_seq_headers - #61:@rmnews line 13:
this:display_seq_headers - #61:@setnews line 14:
this:display_seq_headers
Source
1":parse_message_seq(strings,cur) => {msg_seq,@unused_strings} or string error"; 2""; 3":from_msg_seq(olist) => msg_seq of messages from those people"; 4":%from_msg_seq(strings) => msg_seq of messages with strings in the From: line"; 5":to_msg_seq(olist) => msg_seq of messages to those people"; 6":%to_msg_seq(strings) => msg_seq of messages with strings in the To: line"; 7":subject_msg_seq(target) => msg_seq of messages with target in the Subject:"; 8":body_msg_seq(target) => msg_seq of messages with target in the body"; 9":new_message_num() => number that the next incoming message will receive."; 10":length_num_le(num) => number of messages in folder numbered <= num"; 11":length_date_le(date) => number of messages in folder dated <= date"; 12":length_all_msgs() => number of messages in folder"; 13":exists_num_eq(num) => index of message in folder numbered == num, or 0"; 14""; 15":display_seq_headers(msg_seq[,cur]) display message summary lines"; 16":display_seq_full(msg_seq[,preamble]) display entire messages"; 17" => number of final message displayed"; 18":list_rmm() displays contents of .messages_going."; 19" => the number of messages in .messages_going."; 20""; 21":messages_in_seq(msg_seq) => list of messages in msg_seq on folder"; 22""; 23"See the corresponding routines on $mail_agent for more detail."; 24return this:ok(caller, caller_perms()) ? $mail_agent:(verb)(@args) | E_PERM;
length_date_gt
Referenced by
none
Source
1":length_date_le(date) => number of messages in folder dated > date"; 2""; 3if (this:ok(caller, caller_perms())) 4date = args[1]; 5return (this.last_msg_date <= date) ? 0 | $mail_agent:(verb)(date); 6else 7return E_PERM; 8endif
rm_message_seq
Referenced by
- #29:init_for_core line 3:
this:rm_message_seq - #34:init_for_core line 7:
this:rm_message_seq - #45:expire_old_messages line 17:
this:rm_message_seq
Source
1":rm_message_seq(msg_seq) removes the given sequence of from folder"; 2" => string giving msg numbers removed"; 3"See the corresponding routine on $mail_agent."; 4if (this:ok_write(caller, caller_perms())) 5return $mail_agent:(verb)(@args); 6elseif (this:ok(caller, caller_perms()) && (seq = this:own_messages_filter(caller_perms(), @args))) 7return $mail_agent:(verb)(@listset(args, seq, 1)); 8else 9return E_PERM; 10endif
undo_rmm expunge_rmm renumber keep_message_seq
Referenced by
- #29:init_for_core line 4:
this:expunge_rmm - #34:init_for_core line 8:
this:expunge_rmm - #45:expire_old_messages line 18:
this:expunge_rmm
Source
1":rm_message_seq(msg_seq) removes the given sequence of from folder"; 2" => string giving msg numbers removed"; 3":list_rmm() displays contents of .messages_going."; 4" => number of messages in .messages_going."; 5":undo_rmm() restores previously deleted messages from .messages_going."; 6" => msg_seq of restored messages"; 7":expunge_rmm() destroys contents of .messages_going once and for all."; 8" => number of messages in .messages_going."; 9":renumber([cur]) renumbers all messages"; 10" => {number of messages,new cur}."; 11""; 12"See the corresponding routines on $mail_agent."; 13return this:ok_write(caller, caller_perms()) ? $mail_agent:(verb)(@args) | E_PERM;
own_messages_filter
Referenced by
- #14:rm_message_seq line 2:
this:own_messages_filter - #45:rm_message_seq line 6:
this:own_messages_filter
Source
1":own_messages_filter(who,msg_seq) => subsequence of msg_seq consisting of those messages that <who> is actually allowed to remove (on the assumption that <who> is not one of the allowed writers of this folder."; 2if (!this.rmm_own_msgs) 3return E_PERM; 4elseif ((typeof(seq = this:from_msg_seq({args[1]}, args[2])) != LIST) || (seq != args[2])) 5return {}; 6else 7return seq; 8endif
messages
Referenced by
none
Source
1"NOTE: this routine is obsolete, use :messages_in_seq()"; 2":messages(num) => returns the message numbered num."; 3":messages() => returns the entire list of messages (can be SLOW)."; 4if (!this:ok(caller, caller_perms())) 5return E_PERM; 6elseif (!args) 7return this:messages_in_seq({1, this:length_all_msgs() + 1}); 8elseif (!(n = this:exists_num_eq(args[1]))) 9return E_RANGE; 10else 11return this:messages_in_seq(n)[2]; 12endif
date_sort
Referenced by
- #45:date_sort line 19:
this:date_sort
Source
1if (!this:ok_write(caller, caller_perms())) 2return E_PERM; 3endif 4date_seq = {}; 5for msg in (this.messages) 6date_seq = {@date_seq, msg[2][1]}; 7endfor 8msg_order = $list_utils:sort($list_utils:range(n = length(msgs = this.messages)), date_seq); 9newmsgs = {}; 10for i in [1..n] 11if ($command_utils:suspend_if_needed(0)) 12player:tell("...", i); 13endif 14newmsgs = {@newmsgs, {i, msgs[msg_order[i]][2]}}; 15endfor 16if (length(this.messages) != n) 17"...shit, new mail received,... start again..."; 18fork (0) 19this:date_sort(); 20endfork 21else 22this.messages = newmsgs; 23this.last_used_time = newmsgs[$][2][1]; 24endif
_fix_last_msg_date
Referenced by
- #45:init_for_core line 6:
this:_fix_last_msg_date
Source
1mlen = this:length_all_msgs(); 2this.last_msg_date = mlen && this:messages_in_seq(mlen)[2][1];
moderator_notify
Referenced by
- #45:mail_notify line 2:
this:moderator_notify
Source
1return this.(verb);
msg_summary_line
Referenced by
- #14:display_seq_headers line 22:
this:msg_summary_line - #14:list_rmm line 26:
this:msg_summary_line - #29:display_seq_headers line 13:
this:msg_summary_line
Source
1return $mail_agent:msg_summary_line(@args);
__check
Referenced by
none
Source
1for m in (this.messages) 2$mail_agent:__convert_new(@m[2]); 3$command_utils:suspend_if_needed(0); 4endfor
__fix
Referenced by
none
Source
1if (!this:ok_write(caller, caller_perms())) 2return E_PERM; 3endif 4msgs = {}; 5i = 1; 6for m in (oldmsgs = this.messages) 7msgs = {@msgs, {m[1], $mail_agent:__convert_new(@m[2])}}; 8if ($command_utils:running_out_of_time()) 9player:notify(tostr("...", i, " ", this)); 10suspend(0); 11if (oldmsgs != this.messages) 12return 0; 13endif 14endif 15i = i + 1; 16endfor 17this.messages = msgs; 18return 1;
init_for_core
Referenced by
- #14:init_for_core line 2:
pass( - #29:init_for_core line 2:
pass( - #34:init_for_core line 2:
pass( - #61:init_for_core line 2:
pass( - #70:init_for_core line 2:
pass(
Source
1if (caller_perms().wizard) 2pass(); 3if (!(this in {$mail_recipient, $big_mail_recipient})) 4"...generic mail recipients stay in #-1..."; 5move(this, $mail_agent); 6this:_fix_last_msg_date(); 7endif 8endif
initialize
Referenced by
none
Source
1if ($perm_utils:controls(caller_perms(), this)) 2this.mail_forward = {}; 3return pass(@args); 4endif
mail_name short_mail_name
Referenced by
- #45:@validate line 9:
this:mail_name - #45:@validate line 11:
this:mail_name - #45:@validate line 18:
this:mail_name - #45:@set_expire line 13:
this:mail_name - #45:@set_expire line 13:
this:mail_name - #45:@set_expire line 22:
this:mail_name - #45:@set_expire line 22:
this:mail_name - #45:@register line 18:
this:mail_name - #45:@register line 20:
this:mail_name - #45:@register line 27:
this:mail_name - #45:@register line 34:
this:mail_name - #45:@register line 34:
this:mail_name
Source
1return "*" + this.aliases[1];
mail_names
Referenced by
- #45:look_self line 3:
this:mail_names
Source
1names = {}; 2for a in (this.aliases) 3if (!index(a, " ")) 4names = setadd(names, strsub(a, "_", "-")); 5endif 6endfor 7return names;
expire_old_messages
Referenced by
- #17:expire_old_messages line 4:
pass(
Source
1if (this:ok_write(caller, caller_perms())) 2"Passed security check..."; 3set_task_perms($wiz_utils:random_wizard()); 4for x in (this.mail_notify) 5if (!$object_utils:has_verb(x, "notify_mail")) 6"In theory I should call this:delete_notify but it's ugly and ticky as sin and I'm lazy."; 7this.mail_notify = setremove(this.mail_notify, x); 8endif 9endfor 10if (this.expire_period && (rmseq = $seq_utils:remove(this:unkept_msg_seq(), 1 + this:length_date_le(time() - this.expire_period)))) 11"... i.e., everything not marked kept that is older than expire_period"; 12if (this.registered_email && this.email_validated) 13format = this.owner:format_for_netforward(this:messages_in_seq(rmseq), " expired from " + $mail_agent:name(this)); 14$network:sendmail(this.registered_email, @{format[2], @format[1]}); 15"Do nothing if it bounces, etc."; 16endif 17this:rm_message_seq(rmseq); 18return this:expunge_rmm(); 19else 20return 0; 21endif 22else 23return E_PERM; 24endif
moveto
Referenced by
none
Source
1if (this:is_writable_by(caller_perms()) || this:is_writable_by(caller)) 2pass(@args); 3else 4return E_PERM; 5endif
msg_full_text
Referenced by
- #14:display_seq_full line 15:
this:msg_full_text
Source
1":msg_full_text(@msg) => list of strings."; 2"msg is a mail message (in the usual transmission format)."; 3"display_seq_full calls this to obtain the actual list of strings to display."; 4return player:msg_text(@args); 5"default is to leave it up to the player how s/he wants it to be displayed.";
set_name
Referenced by
none
Source
1{name} = args; 2if ((caller != this) && (!$perm_utils:controls(caller_perms(), this))) 3return E_PERM; 4elseif (this.location != $mail_agent) 5"... we don't care..."; 6return pass(@args); 7elseif (index(name, " ")) 8"... we don't care..."; 9elseif (rp = $mail_agent:reserved_pattern(name)) 10player:tell("Mailing list name \"", a, "\" uses a reserved pattern: ", rp[1]); 11return 0; 12elseif (valid(p = $mail_agent:match(name, $nothing)) && ((p != this) && (name in p.aliases))) 13player:tell("Mailing list name \"", name, "\" in use on ", p.name, "(", p, ")"); 14return 0; 15endif 16return pass(name);
@validate
Referenced by
none
Source
1"Syntax: @validate <recipient> with <password>"; 2""; 3"This command is used to validate an email address set to receive expired messages that did not match the list owner's registered email address. When using the @register command, a password was sent via email to the address specified. This command is to verify that the password was received properly."; 4if ((caller_perms() != #-1) && (caller_perms() != player)) 5return player:tell(E_PERM); 6elseif (!$perm_utils:controls(player, this)) 7return player:tell(E_PERM); 8elseif (!this.registered_email) 9return player:tell("No email address has even been set for ", this:mail_name(), "."); 10elseif (this.email_validated) 11return player:tell("The email address for ", this:mail_name(), " has already been validated."); 12elseif (!iobjstr) 13return player:tell("Usage: @validate <recipient> with <password>"); 14elseif (iobjstr != this.validation_password) 15return player:tell("That is not the correct password."); 16else 17this.email_validated = 1; 18player:tell("Password validated. Messages that expire after ", (this.expire_period == 0) ? "never" | $time_utils:english_time(this.expire_period), " from ", this:mail_name(), " will be emailed to ", this.registered_email, "."); 19endif
@set_expire
Referenced by
none
Source
1"Syntax: @set_expire <recipient> to <time>"; 2" @set_expire <recipient> to"; 3""; 4"Allows the list owner to set the expiration period of this mail recipient. This is the time messages will remain before they are removed from the list. The <time> given can be in english terms (e.g., 2 months, 45 days, etc.)."; 5"Non-wizard mailing list owners are limited to a maximum expire period of 180 days. They are also prohibited from setting the list to non-expiring."; 6"Wizards may set the expire period to 0 for no expiration."; 7"The second form, leaving off the time specification, will tell you what the recipient's expire period is currently set to."; 8if ((caller_perms() != #-1) && (caller_perms() != player)) 9return player:tell(E_PERM); 10elseif (!this:is_writable_by(player)) 11return player:tell(E_PERM); 12elseif (!iobjstr) 13return player:tell(this.expire_period ? tostr("Messages will automatically expire from ", this:mail_name(), " after ", $time_utils:english_time(this.expire_period), ".") | tostr("Messages will not expire from ", this:mail_name())); 14elseif (typeof(time = $time_utils:parse_english_time_interval(iobjstr)) == ERR) 15return player:tell(time); 16elseif ((time == 0) && (!player.wizard)) 17return player:tell("Only wizards may set a mailing list to not expire."); 18elseif ((time > (180 * 86400)) && (!player.wizard)) 19return player:tell("Only a wizard may set the expiration period on a mailing list to greater than 180 days."); 20endif 21this.expire_period = time; 22player:tell("Messages will ", (time != 0) ? tostr("automatically expire from ", this:mail_name(), " after ", $time_utils:english_time(time)) | tostr("not expire from ", this:mail_name()), ".");
@register @netregister
Referenced by
none
Source
1"Syntax: @register <recipient> to <email-address>"; 2"alias @netregister <recipient> to <email-address>"; 3" @register <recipient> to"; 4""; 5"The list owner may use this command to set a registered email address for the mail recipient. When set, mail messages that expire off of the mail recipient will be mailed to that address."; 6"If you leave the email address off of the command, it will return the current registration and expiration information for that recipient if you own it."; 7"The owner may register a mail recipient to any email address. However, if the address does not match his registered email address, then a password will be generated and sent to the address specified when this command is used. Then, the owner may retrieve that password and verify the address with the command:"; 8""; 9" @validate <recipient> with <password>"; 10""; 11"See *B:MailingListReform #98087 for full details."; 12if ((caller_perms() != #-1) && (caller_perms() != player)) 13return player:tell(E_PERM); 14elseif (!$perm_utils:controls(player, this)) 15return player:tell(E_PERM); 16elseif (!iobjstr) 17if (this.registered_email) 18player:tell(this:mail_name(), " is registered to ", this.registered_email, ". Messages will be sent there when they expire after ", (this.expire_period == 0) ? "never" | $time_utils:english_time(this.expire_period), "."); 19else 20player:tell(this:mail_name(), " is not registered to any address. Messages will be deleted when they expire after ", (this.expire_period == 0) ? "never" | $time_utils:english_time(this.expire_period), "."); 21player:tell("Usage: @register <recipient> to <email-address>"); 22endif 23return; 24elseif (iobjstr == $wiz_utils:get_email_address(player)) 25this.registered_email = $wiz_utils:get_email_address(player); 26this.email_validated = 1; 27player:tell("Messages expired from ", this:mail_name(), " after ", (this.expire_period == 0) ? "never" | $time_utils:english_time(this.expire_period), " will be emailed to ", this.registered_email, " (which is your registered email address)."); 28elseif (reason = $network:invalid_email_address(iobjstr)) 29return player:tell(reason, "."); 30elseif (!$network.active) 31return player:tell("The network is not up at the moment. Please try again later or contact a wizard for help."); 32else 33password = $wiz_utils:random_password(5); 34result = $network:sendmail(iobjstr, tostr($network.MOO_Name, " mailing list verification"), @$generic_editor:fill_string(tostr("The mailing list ", this:mail_name(), " on ", $network.MOO_Name, " has had this address designated as the recipient of expired mail messages. If this is not correct, then you need do nothing but ignore this message. If this is correct, you must log into the MOO and type: `@validate ", this:mail_name(), " with ", password, "' to start receiving expired mail messages."), 75)); 35if (result != 0) 36return player:tell("Mail sending did not work: ", result, ". Address not set."); 37endif 38this.registered_email = iobjstr; 39this.email_validated = 0; 40this.validation_password = password; 41player:tell("Registration complete. Password sent to the address you specified. When you receive the email, log back in to validate it with the command: @validate <recipient> with <password>. If you do not receive the password email, try again or notify a wizard if this is a recurring problem."); 42endif