void nntp_capabilities(void)
{
cprintf("101 Capability list:\r\n");
+ cprintf("VERSION 2\r\n");
+ cprintf("READER\r\n");
+ cprintf("LIST ACTIVE NEWSGROUPS\r\n");
+ cprintf("IMPLEMENTATION Citadel v%d.%02d\r\n", (REV_LEVEL/100), (REV_LEVEL%100));
#ifdef HAVE_OPENSSL
cprintf("STARTTLS\r\n");
#endif
high_water_mark = nm.msgnums[nm.num_msgs - 1];
}
+ // Only the mandatory formats are supported
switch(which_format) {
case NNTP_LIST_ACTIVE:
// FIXME we have hardcoded "n" for "no posting allowed" -- fix when we add posting
cprintf("%s %s\r\n", n_name, qrbuf->QRname);
break;
}
- // FIXME do all the other formats, bitch
if (nm.msgnums != NULL) {
free(nm.msgnums);
int view;
struct nntp_list_data *nld = (struct nntp_list_data *)data;
+ // FIXME do something with nld->wildmat, bitch
+
CtdlRoomAccess(qrbuf, &CC->user, &ra, &view);
if (ra & UA_KNOWN) {
output_roomname_in_list_format(qrbuf, nld->list_format);
extract_token(list_format, cmd, 1, ' ', sizeof list_format);
extract_token(wildmat, cmd, 2, ' ', sizeof wildmat);
+ if (strlen(wildmat) > 0) {
+ nld.wildmat = wildmat;
+ }
+ else {
+ nld.wildmat = NULL;
+ }
+
if ( (strlen(cmd) < 6) || (!strcasecmp(list_format, "ACTIVE")) ) {
nld.list_format = NNTP_LIST_ACTIVE;
}