]> pd.if.org Git - newsd/blobdiff - Net-Server-NNTP/lib/Net/Server/NNTP.pm
Fixed bug in IHAVE response.
[newsd] / Net-Server-NNTP / lib / Net / Server / NNTP.pm
index 63c37b097622febbf9f5108ef73849b372e5bee5..3b6eb21eb4fd7d4cec4e78515741b321e6adeab2 100644 (file)
@@ -62,13 +62,6 @@ Perhaps a little code snippet.
     my $foo = Net::Server::NNTP->new();
     ...
 
-=head1 EXPORT
-
-Nothing is exported.
-
-A list of functions that can be exported. You can delete this section if
-you don't export anything, such as for a purely object-oriented module.
-
 =cut 
 
 our $article_re = qr/\<[^\s\>]+\@[^\s\>]+\>/; # rfc 1036 2.1.5
@@ -407,9 +400,9 @@ sub stat {
                $s->article_number($n);
        } elsif (!@args) {
                ($g, $n) = $s->pointer;
-               $s->log(4, "fetching ($g $n)");
                return $s->response(412) unless defined $g;
                return $s->response(420) unless defined $n;
+               $s->log(4, "fetching ($g $n)");
                $id = $s->fetch_stat($g,$n);
                return $s->response(420) unless defined $id;
        } else {
@@ -498,7 +491,7 @@ sub ihave {
        my $ok = 0;
 
        return $s->response(501) unless $id =~ /($article_re)/;
-       return $s->response(430) if $s->fetch_stat($id);
+       return $s->response(435) if $s->fetch_stat($id);
        return $s->response(436) unless $s->permit_posting;
 
        $s->response(335);
@@ -555,6 +548,7 @@ our %capabilities = (
        'OVER MSGID'    => '',
        'LIST ACTIVE NEWSGROUPS OVERVIEW.FMT ACTIVE.TIMES HEADERS'      => '',
        STREAMING       => '',
+       IMPLEMENTATION  => 'if.org newsd',
 );
 
 our %hdrs = (