my ($self, $wildmat) = @_;
wildmat2re($wildmat);
foreach my $ng (@{$self->{nntpd}->{grouplist}}) {
- $ng->{name} =~ $wildmat or next;
+ $ng->{newsgroup} =~ $wildmat or next;
group_line($self, $ng);
}
}
my ($self, $wildmat) = @_;
wildmat2re($wildmat);
foreach my $ng (@{$self->{nntpd}->{grouplist}}) {
- $ng->{name} =~ $wildmat or next;
+ $ng->{newsgroup} =~ $wildmat or next;
my $c = eval { $ng->mm->created_at } || time;
- more($self, "$ng->{name} $c $ng->{address}");
+ more($self, "$ng->{newsgroup} $c $ng->{address}");
}
}
my ($self, $wildmat) = @_;
wildmat2re($wildmat);
foreach my $ng (@{$self->{nntpd}->{grouplist}}) {
- $ng->{name} =~ $wildmat or next;
+ $ng->{newsgroup} =~ $wildmat or next;
my $d = $ng->description;
- more($self, "$ng->{name} $d");
+ more($self, "$ng->{newsgroup} $d");
}
}
sub group_line ($$) {
my ($self, $ng) = @_;
my ($min, $max) = $ng->mm->minmax;
- more($self, "$ng->{name} $max $min n") if defined $min && defined $max;
+ more($self, "$ng->{newsgroup} $max $min n") if defined $min && defined $max;
}
sub cmd_newgroups ($$$;$$) {
ngpat2re($skip);
my @srch;
foreach my $ng (@{$self->{nntpd}->{grouplist}}) {
- $ng->{name} =~ $keep or next;
- $ng->{name} =~ $skip and next;
+ $ng->{newsgroup} =~ $keep or next;
+ $ng->{newsgroup} =~ $skip and next;
my $srch = $ng->search or next;
push @srch, $srch;
};
my ($hdr, $ng, $n, $mid) = @_;
# clobber some
- $hdr->header_set('Newsgroups', $ng->{name});
+ $hdr->header_set('Newsgroups', $ng->{newsgroup});
$hdr->header_set('Xref', xref($ng, $n));
header_append($hdr, 'List-Post', "<mailto:$ng->{address}>");
if (my $url = $ng->{url}) {
sub xref ($$) {
my ($ng, $n) = @_;
- "$ng->{domain} $ng->{name}:$n"
+ "$ng->{domain} $ng->{newsgroup}:$n"
}
sub mid_lookup ($$) {
my @paths;
foreach my $ng (values %{$self->{nntpd}->{groups}}) {
my $n = $ng->mm->num_for($mid);
- push @paths, "$ng->{name}/$n" if defined $n;
+ push @paths, "$ng->{newsgroup}/$n" if defined $n;
}
return '430 no such article on server' unless @paths;
'223 '.join(' ', @paths);
require PublicInbox::Git;
sub new {
- my ($class, $name, $git_dir, $address, $url) = @_;
+ my ($class, $newsgroup, $git_dir, $address, $url) = @_;
# first email address is preferred
$address = $address->[0] if ref($address);
$url .= '/' if $url !~ m!/\z!;
}
my $self = bless {
- name => $name,
+ newsgroup => $newsgroup,
git_dir => $git_dir,
address => $address,
url => $url,