850 @verb #12:"bonk_on_mail" this none this rxdo #55 @program #12:"bonk_on_mail" this none this ":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.") this.location:announce_all_but({this}, "The Postman arrives, hands some new mail to ", this:title(), ", 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:38 2005 MDT." . 0