]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NNTPD.pm
nntpd: avoid uninitialized warning
[public-inbox.git] / lib / PublicInbox / NNTPD.pm
index 85109ea7ed57b722d8822c51339635c4b8ca6649..fc26c5c0b812c18875ae2370b3efbb701b31dc98 100644 (file)
@@ -30,11 +30,12 @@ sub refresh_groups () {
                my $git_dir = $pi_config->{$k};
                my $addr = $pi_config->{"publicinbox.$g.address"};
                my $ngname = $pi_config->{"publicinbox.$g.newsgroup"};
+               my $url = $pi_config->{"publicinbox.$g.url"};
                if (defined $ngname) {
                        next if ($ngname eq ''); # disabled
                        $g = $ngname;
                }
-               my $ng = PublicInbox::NewsGroup->new($g, $git_dir, $addr);
+               my $ng = PublicInbox::NewsGroup->new($g, $git_dir, $addr, $url);
                my $old_ng = $self->{groups}->{$g};
 
                # Reuse the old one if possible since it can hold
@@ -50,7 +51,7 @@ sub refresh_groups () {
                        push @list, $ng;
                }
        }
-       @list = sort { $a->{name} cmp $b->{name} } @list;
+       @list = sort { $a->{newsgroup} cmp $b->{newsgroup} } @list;
        $self->{grouplist} = \@list;
        # this will destroy old groups that got deleted
        %{$self->{groups}} = %$new;