about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-11-27 09:52:52 +0000
committerEric Wong <e@80x24.org>2020-11-28 04:53:21 +0000
commit3e554f68b706c2f3dd985baf64abd6921a7d9bc2 (patch)
treef4a199c8bfb6ff445ed3b0a4e06ef8a3af8830df /lib
parentf89086d7013ae770157c2a01bd95c79d22de1a31 (diff)
downloadpublic-inbox-3e554f68b706c2f3dd985baf64abd6921a7d9bc2.tar.gz
Reduce screen real estate usage to reduce human attention span
requirements.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/NNTP.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index af40b86d..967a36a5 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -92,8 +92,7 @@ sub process_line ($$) {
                 err($self, 'error from: %s (%s)', $l, $err);
                 $res = '503 program fault - command not performed';
         }
-        return 0 unless defined $res;
-        res($self, $res);
+        defined($res) ? res($self, $res) : 0;
 }
 
 # The keyword argument is not used (rfc3977 5.2.2)
@@ -109,9 +108,7 @@ sub cmd_capabilities ($;$) {
 
 sub cmd_mode ($$) {
         my ($self, $arg) = @_;
-        $arg = uc $arg;
-        return r501 unless $arg eq 'READER';
-        '201 Posting prohibited';
+        uc($arg) eq 'READER' ? '201 Posting prohibited' : r501;
 }
 
 sub cmd_slave ($) { '202 slave status noted' }