5ac @verb #8438:"@mailup*date" none none none rdo #8438 @program #8438:"@mailup*date" none none none "Updates the player's newsgroup property." " usage: @mailup*date" player:tell("Updating mailing lists. . .") "Check for new newsgroups. . ." for x in ($newsgroup:leaves()) if (player in x:subscribers() && !(x in player.newsgroups)) player:tell("Adding ", $su:nn(x), ". . .") player.newsgroups = {@player.newsgroups, x} endif $command_utils:suspend_if_advisable() endfor "Remove dead links. . ." for x in (this.newsgroups) if (!valid(x) || !x:isa($newsgroup)) player:tell("Removing ", x == #-1 ? "invalid newsgroup" | $string_utils:nn(x), ". . .") player.newsgroups = setremove(player.newsgroups, x) $cmd_utils:suspend_if_needed() endif endfor player:tell("You are now subscribed to ", len = length(this.newsgroups), " newsgroup", len > 1 ? "s" | "", ".") if ($cmd_utils:yes_or_no("List all newsgroups?")) groups = {} for news in (this.newsgroups) groups = {@groups, {news:title(), news, $list_utils:shortest(news:mail_names()), length(news:subscribers()), news.owner.name, news.owner}} $command_utils:suspend_if_needed(0) endfor groups = $list_utils:sort(groups) this:tellcolumns({28, 5, 6, 4, 20, 5}, {"Group Name", "#", "Alias", "Sub.", "Moderator", "#"}, @groups) this:tell("[. End of List .]") endif "Last modified by Jay (#8438) on Thu Sep 14 11:32:34 2000 MDT." . 0