X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fnntp%2Fserv_nntp.c;h=094475ed4c59e5c726a0415b1c25d337f19c9384;hb=ce753300e6fdacbfbd5614cf0de30493b8919c9c;hp=2b094586d9520f369cb72fe4edabc2b34b21611a;hpb=535d0906fc5ee4a936b04051bd6c55be9c06e712;p=citadel.git diff --git a/citadel/modules/nntp/serv_nntp.c b/citadel/modules/nntp/serv_nntp.c index 2b094586d..094475ed4 100644 --- a/citadel/modules/nntp/serv_nntp.c +++ b/citadel/modules/nntp/serv_nntp.c @@ -551,6 +551,25 @@ void nntp_help(void) { } +/* + * Implements the GROUP command + */ +void nntp_group(const char *cmd) { + /* + * HACK: this works because the 5XX series error codes from citadel + * protocol will also be considered error codes by an NNTP client + */ + if (CtdlAccessCheck(ac_logged_in_or_guest)) return; + + char requested_group[1024]; + char requested_room[ROOMNAMELEN]; + extract_token(requested_group, cmd, 1, ' ', sizeof requested_group); + newsgroup_to_room(requested_room, requested_group, sizeof requested_room); + + cprintf("599 FIXME screw you and your %s\r\n", requested_room); +} + + /* * Main command loop for NNTP server sessions. */ @@ -601,6 +620,10 @@ void nntp_command_loop(void) nntp_list(ChrPtr(Cmd)); } + else if (!strcasecmp(cmdname, "group")) { + nntp_group(ChrPtr(Cmd)); + } + else { cprintf("500 I'm afraid I can't do that.\r\n"); }