Generic Mail Recipient #45

Parent #1Owner #36Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: Generic Mail Recipient

38 verbs · 23 properties · 5 children

Verbs

VerbSpecFlagsDefinerLines
set_aliasesthis none thisrxd#4522
look_selfthis none thisrxd#4546
is_writable_bythis none thisrxd#451
is_readable_bythis none thisrxd#451
is_usable_bythis none thisrxd#456
mail_notifythis none thisrxd#455
mail_forwardthis none thisrxd#457
moderator_forwardthis none thisrxd#455
add_forwardthis none thisrxd#4526
delete_forwardthis none thisrxd#4528
add_notifythis none thisrxd#4519
delete_notifythis none thisrxd#4523
receive_messagethis none thisrxd#458
okthis none thisrxd#452
ok_writethis none thisrxd#452
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_stringthis none thisrxd#4524
length_date_gtthis none thisrxd#458
rm_message_seqthis none thisrxd#4510
undo_rmm expunge_rmm renumber keep_message_seqthis none thisrxd#4513
own_messages_filterthis none thisrxd#458
messagesthis none thisrxd#4512
date_sortthis none thisrxd#4524
_fix_last_msg_datethis none thisrxd#452
moderator_notifythis none thisrxd#451
msg_summary_linethis none thisrxd#451
__checkthis none thisrxd#454
__fixthis none thisrxd#4518
init_for_corethis none thisrxd#458
initializethis none thisrxd#454
mail_name short_mail_namethis none thisrxd#451
mail_namesthis none thisrxd#457
expire_old_messagesthis none thisrxd#4524
movetothis none thisrxd#455
msg_full_textthis none thisrxd#455
set_namethis none thisrxd#4516
@validatethis with/using anyrxd#4519
@set_expirethis at/to anyrxd#4522
@register @netregisterthis at/to anyrxd#4542

Properties

PropertyDefinerFlagsOwnerValue
moderator_notify#45rc#36{}
last_msg_date#45r#360
messages_going#45#36{}
moderated#45rc#36{}
moderator_forward#45rc#36"%n (%#) can't send to moderated list %t (%[#t]) directly."
writers#45rc#36{}
readers#45rc#36{}
mail_notify#45r#36{}
mail_forward#45r#36"%t (%[#t]) is a generic recipient."
expire_period#45r#362592000
last_used_time#45r#360
messages#45#36{}
rmm_own_msgs#45rc#361
guests_can_send_here#45rc#360
messages_kept#45r#36{}
registered_email#45#36""
email_validated#45#361
validation_password#45#36""
key#1c#36<clear>
aliases#1r#36{"Generic Mail Recipient"}
description#1rc#36"This can either be a mailing list or a mail folder, depending on what mood you're in..."
object_size#1r#36{33039, -1090650497}
html#1rc#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

calls n45_0 #45:set_aliases n42_0 #42:controls n45_0->n42_0 n1_5 #1:set_aliases n45_0->n1_5 n46_42 #46:reserved_pattern n45_0->n46_42 n6_18 #6:tell n45_0->n6_18 n46_9 #46:match n45_0->n46_9 n45_1 #45:look_self n45_1->n6_18 n45_30 #45:mail_names n45_1->n45_30 n20_5 #20:from_list n45_1->n20_5 n45_6 #45:mail_forward n45_1->n45_6 n45_2 #45:is_writable_by n45_1->n45_2 n45_3 #45:is_readable_by n45_1->n45_3 n45_4 #45:is_usable_by n45_1->n45_4 n1_9 #1:description n45_1->n1_9 n50_68 #50:fill_string n45_1->n50_68 n56_8 #56:suspend_if_needed n45_1->n56_8 n45_6->n45_4 n45_7 #45:moderator_forward n45_6->n45_7 n20_34 #20:pronoun_sub n45_6->n20_34 n45_2->n42_0 n45_3->n45_2 n46_1 #46:sends_to n45_3->n46_1 n45_4->n45_2 n52_5 #52:isa n45_4->n52_5 n45_5 #45:mail_notify n45_5->n45_4 n45_23 #45:moderator_notify n45_5->n45_23 n45_7->n20_34 n45_8 #45:add_forward n45_8->n42_0 n52_6 #52:ancestors n45_8->n52_6 n45_9 #45:delete_forward n45_9->n42_0 n45_10 #45:add_notify n45_10->n42_0 n45_10->n45_3 n45_11 #45:delete_notify n45_11->n42_0 n45_12 #45:receive_message n45_14 #45:ok_write n45_12->n45_14 n45_15 #45:parse_message_seq n45_12->n45_15 n45_14->n45_2 n45_13 #45:ok n45_15->n45_13 n45_13->n45_3 n45_16 #45:length_date_gt n45_16->n45_13 n45_17 #45:rm_message_seq n45_17->n45_14 n45_17->n45_13 n45_19 #45:own_messages_filter n45_17->n45_19 n45_19->n45_15 n45_18 #45:undo_rmm n45_18->n45_14 n45_20 #45:messages n45_20->n45_15 n45_20->n45_13 n45_21 #45:date_sort n45_21->n6_18 n45_21->n56_8 n45_21->n45_14 n45_21->n45_21 n55_14 #55:sort n45_21->n55_14 n55_1 #55:range n45_21->n55_1 n45_22 #45:_fix_last_msg_date n45_22->n45_15 n45_24 #45:msg_summary_line n46_22 #46:msg_summary_line n45_24->n46_22 n45_25 #45:__check n45_25->n56_8 n46_39 #46:__convert_new n45_25->n46_39 n45_26 #45:__fix n45_26->n45_14 n45_26->n46_39 n56_7 #56:running_out_of_time n45_26->n56_7 n6_10 #6:notify n45_26->n6_10 n45_27 #45:init_for_core n45_27->n45_22

Showing 48 of 70 verbs; 22 not shown.

Source

set_aliases

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1return $perm_utils:controls(who = args[1], this) || `who in this.writers ! E_TYPE';

is_readable_by

Spec this none thisFlags rxdOwner #36Definer #45

Referenced 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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced 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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1if (typeof(mf = this.(verb)) == STR)
2return $string_utils:pronoun_sub(mf, args ? args[1] | $player);
3else
4return mf;
5endif

add_forward

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #2Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #2Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1mlen = this:length_all_msgs();
2this.last_msg_date = mlen && this:messages_in_seq(mlen)[2][1];

moderator_notify

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1return this.(verb);

msg_summary_line

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1return $mail_agent:msg_summary_line(@args);

__check

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #2Definer #45

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

Spec this none thisFlags rxdOwner #2Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #2Definer #45

Referenced by

none

Source

1if ($perm_utils:controls(caller_perms(), this))
2this.mail_forward = {};
3return pass(@args);
4endif

mail_name short_mail_name

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1return "*" + this.aliases[1];

mail_names

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

Source

1names = {};
2for a in (this.aliases)
3if (!index(a, " "))
4names = setadd(names, strsub(a, "_", "-"));
5endif
6endfor
7return names;

expire_old_messages

Spec this none thisFlags rxdOwner #2Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this none thisFlags rxdOwner #36Definer #45

Referenced by

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

Spec this none thisFlags rxdOwner #36Definer #45

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

Spec this with/using anyFlags rxdOwner #36Definer #45

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

Spec this at/to anyFlags rxdOwner #36Definer #45

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

Spec this at/to anyFlags rxdOwner #2Definer #45

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