659 @verb #12:"@rn check_mail_lists @subscribed" none none none rxdo #55 @program #12:"@rn check_mail_lists @subscribed" none none none set_task_perms(caller == this ? this.owner | caller_perms()) $mail_agent:mailread_semaphore_enter(this) which = {} cm = this.current_message cm[1..2] = verb == "@rn" ? {{this, @cm[1..2]}} | {} all = verb == "@subscribed" for n in (cm) rcpt = n[1] if ($mail_agent:is_recipient(rcpt)) if (`msgs = n[1]:unread_messages(this) ! E_PERM => {}' || all) msgs == E_PERM && (msgs = {}) which = {@which, {n[1], length(msgs)}} endif " if (`(nmsgs = n[1]:length_date_gt(n[3])) || all ! E_PERM => 0')" " which = {@which, {n[1], nmsgs}};" " endif" else player:notify(tostr("Bogus recipient ", rcpt, " removed from .current_message.")) this.current_message = setremove(this.current_message, n) endif $command_utils:suspend_if_needed() endfor if (which) suspend(0) player:notify(verb == "@subscribed" ? "You are subscribed to the following lists:" | "There is new activity on the following lists:") for w in (which) name = $mail_agent:name(w[1]) player:tell($string_utils:left(" " + name, 40), " ", w[2], " new message", w[2] == 1 ? "" | "s") endfor $cmd_utils:suspend_if_needed(0) elseif (verb == "@rn") player:notify("No new activity on any of your lists.") elseif (verb == "@subscribed") player:notify("You aren't subscribed to any mailing lists.") endif $mail_agent:mailread_semaphore_exit(this) return which "Last modified by Lao-Tzu (#8084) on Wed Jul 24 19:01:55 2002 MDT." . 0