From 535d0906fc5ee4a936b04051bd6c55be9c06e712 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 1 Feb 2014 16:05:02 -0500 Subject: [PATCH] Added mandatory HELP command; removed nonstandard NOOP command. --- citadel/modules/nntp/serv_nntp.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/citadel/modules/nntp/serv_nntp.c b/citadel/modules/nntp/serv_nntp.c index 82c8f2034..2b094586d 100644 --- a/citadel/modules/nntp/serv_nntp.c +++ b/citadel/modules/nntp/serv_nntp.c @@ -231,12 +231,6 @@ void nntp_starttls(void) } -void nntp_noop(void) -{ - cprintf("250 NOOP\r\n"); -} - - void nntp_capabilities(void) { cprintf("101 Capability list:\r\n"); @@ -547,6 +541,16 @@ void nntp_list(const char *cmd) { } +/* + * Implement HELP command. + */ +void nntp_help(void) { + cprintf("100 This is the Citadel NNTP service.\r\n"); + cprintf("RTFM http://www.ietf.org/rfc/rfc3977.txt\r\n"); + cprintf(".\r\n"); +} + + /* * Main command loop for NNTP server sessions. */ @@ -573,6 +577,10 @@ void nntp_command_loop(void) nntp_quit(); } + else if (!strcasecmp(cmdname, "help")) { + nntp_help(); + } + else if (!strcasecmp(cmdname, "capabilities")) { nntp_capabilities(); } @@ -581,10 +589,6 @@ void nntp_command_loop(void) nntp_starttls(); } - else if (!strcasecmp(cmdname, "noop")) { - nntp_noop(); - } - else if (!strcasecmp(cmdname, "authinfo")) { nntp_authinfo(ChrPtr(Cmd)); } -- 2.30.2