867 @verb #3152:"bonk_on_mail" this none this rxdo #3152 @program #3152:"bonk_on_mail" this none this if (this:Connected()) this:custom_callers() endif "Copied from Generic Player (#12):bonk_on_mail by Slacker (#55) Oct 21 08:51:37 2002" ":notify_mail(from,recipients[,msgnums])" " used by $mail_agent:raw_send to notify this player about mail being sent" " from to . if given gives the message number(s) assigned (in the event that the corresponding recipient actually kept the mail)" if (!this:connected()) return elseif (!$perm_utils:controls(caller_perms(), this)) raise(E_PERM) else {from, recipients, ?msgnums = {}} = args "... msgnums may be shorter than recipients or may have some slots filled" "... with 0's if msg numbers are not available for some recipients." if ((t = this in recipients) && (length(msgnums) >= t && msgnums[t])) "... you are getting the mail and moreover your :receive_message kept it." namelist = $string_utils:english_list($list_utils:map_arg($mail_agent, "name", setremove(recipients, this)), "") this:tell("The Postman arrives, hands you new mail from ", typeof(from) == $OBJ ? from:nn() | from, namelist ? " (which was also sent to " + namelist + ")" | "", ", then departs.") if (!this:mail_option("expert")) this:tell("Type `@mail on me' for info on reading it.") endif else "... vanilla notification; somebody got sent mail and you're finding out." namelist = $string_utils:english_list({@t ? {"You"} | {}, @$list_utils:map_arg($mail_agent, "name", setremove(recipients, this))}, "") if (from == $no_one) this:tell("", namelist, length(recipients) == 1 ? " has" | " have", " just been sent new mail.") else this:tell("", namelist, length(recipients) == 1 ? " has" | " have", " just been sent new mail by ", typeof(from) == $OBJ ? from:nn() | from, ".") endif endif endif "Last modified by Dax (#789) on Tue May 3 13:49:42 2005 MDT." . 0