]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NNTP.pm
nntp: MODE READER denies posting
[public-inbox.git] / lib / PublicInbox / NNTP.pm
index faa756345a396ab42293453c167d11e2e99ad0ff..142bee391d2b24ef8be2679df1ebec58decfc22e 100644 (file)
@@ -24,7 +24,7 @@ use constant {
 sub now () { clock_gettime(CLOCK_MONOTONIC) };
 
 my @OVERVIEW = qw(Subject From Date Message-ID References Bytes Lines);
-my %OVERVIEW = map { $_ => 1 } @OVERVIEW;
+my $OVERVIEW_FMT = join(":\r\n", @OVERVIEW) . ":\r\n";
 
 # disable commands with easy DoS potential:
 # LISTGROUP could get pretty bad, too...
@@ -78,7 +78,7 @@ sub cmd_mode ($$) {
        my ($self, $arg) = @_;
        $arg = uc $arg;
        return r501 unless $arg eq 'READER';
-       '200 reader status acknowledged';
+       '201 Posting prohibited';
 }
 
 sub cmd_slave ($) { '202 slave status noted' }
@@ -90,9 +90,9 @@ sub cmd_xgtitle ($;$) {
        '.'
 }
 
-sub list_overview_fmt ($$) {
+sub list_overview_fmt ($) {
        my ($self) = @_;
-       more($self, $_ . ':') foreach @OVERVIEW;
+       do_more($self, $OVERVIEW_FMT);
 }
 
 sub list_active ($;$) {