From 528230a0411897a14cbb79d0dae02ea89827bf1e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 28 May 2016 01:57:14 +0000 Subject: remove redundant NewsGroup class Most of its functionality is in the PublicInbox::Inbox class. While we're at it, we no longer auto-create newsgroup names based on the inbox name, since newsgroup names probably deserve some thought when it comes to hierarchy. --- lib/PublicInbox/NNTP.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/NNTP.pm') diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index f3de4b1c..58b86a82 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -195,7 +195,7 @@ sub list_active_times ($;$) { foreach my $ng (@{$self->{nntpd}->{grouplist}}) { $ng->{newsgroup} =~ $wildmat or next; my $c = eval { $ng->mm->created_at } || time; - more($self, "$ng->{newsgroup} $c $ng->{address}"); + more($self, "$ng->{newsgroup} $c $ng->{-primary_address}"); } } @@ -413,7 +413,8 @@ sub cmd_last ($) { article_adj($_[0], -1) } sub cmd_post ($) { my ($self) = @_; my $ng = $self->{ng}; - $ng ? "440 mailto:$ng->{address} to post" : '440 posting not allowed' + $ng ? "440 mailto:$ng->{-primary_address} to post" + : '440 posting not allowed' } sub cmd_quit ($) { @@ -438,8 +439,8 @@ sub set_nntp_headers { # clobber some $hdr->header_set('Newsgroups', $ng->{newsgroup}); $hdr->header_set('Xref', xref($ng, $n)); - header_append($hdr, 'List-Post', "{address}>"); - if (my $url = $ng->{url}) { + header_append($hdr, 'List-Post', "{-primary_address}>"); + if (my $url = $ng->base_url) { $mid = uri_escape_utf8($mid); header_append($hdr, 'Archived-At', "<$url$mid/>"); header_append($hdr, 'List-Archive', "<$url>"); -- cgit v1.2.3-24-ge0c7