]> Sergey Matveev's repositories - public-inbox.git/blobdiff - public-inbox-nntpd
README: document NNTP access
[public-inbox.git] / public-inbox-nntpd
index 79161fb71b2fb188ba69b04c98f4fdccfbabf6e6..0035637d7aa874f8da400a4128991b2fbdcc0e5e 100644 (file)
@@ -6,6 +6,7 @@ use warnings;
 require PublicInbox::Daemon;
 require PublicInbox::NewsGroup;
 require PublicInbox::NNTP;
+require PublicInbox::Config;
 my $nntpd = PublicInbox::NNTPD->new;
 daemon_run('0.0.0.0:119',
        sub { $nntpd->refresh_groups },
@@ -28,7 +29,6 @@ sub new {
 
 sub refresh_groups () {
        my ($self) = @_;
-       require PublicInbox::Config;
        my $pi_config = PublicInbox::Config->new;
        my $new = {};
        my @list;
@@ -52,8 +52,8 @@ sub refresh_groups () {
                        $ng = $old_ng;
                }
 
-               # Only valid if Msgmap works
-               if ($ng->mm(1)) {
+               # Only valid if msgmap and search works
+               if ($ng->usable) {
                        $new->{$g} = $ng;
                        push @list, $ng;
                }