projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34e3dd7
)
Added mandatory HELP command; removed nonstandard NOOP command.
author
Art Cancro
<ajc@uncensored.citadel.org>
Sat, 1 Feb 2014 21:05:02 +0000
(16:05 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Sat, 1 Feb 2014 21:05:02 +0000
(16:05 -0500)
citadel/modules/nntp/serv_nntp.c
patch
|
blob
|
history
diff --git
a/citadel/modules/nntp/serv_nntp.c
b/citadel/modules/nntp/serv_nntp.c
index 82c8f2034eb1e1bcbcc4f2cd3679d9c134a415a5..2b094586d9520f369cb72fe4edabc2b34b21611a 100644
(file)
--- 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");
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.
*/
/*
* Main command loop for NNTP server sessions.
*/
@@
-573,6
+577,10
@@
void nntp_command_loop(void)
nntp_quit();
}
nntp_quit();
}
+ else if (!strcasecmp(cmdname, "help")) {
+ nntp_help();
+ }
+
else if (!strcasecmp(cmdname, "capabilities")) {
nntp_capabilities();
}
else if (!strcasecmp(cmdname, "capabilities")) {
nntp_capabilities();
}
@@
-581,10
+589,6
@@
void nntp_command_loop(void)
nntp_starttls();
}
nntp_starttls();
}
- else if (!strcasecmp(cmdname, "noop")) {
- nntp_noop();
- }
-
else if (!strcasecmp(cmdname, "authinfo")) {
nntp_authinfo(ChrPtr(Cmd));
}
else if (!strcasecmp(cmdname, "authinfo")) {
nntp_authinfo(ChrPtr(Cmd));
}