From: Wilfried Göesgens Date: Sat, 23 Jun 2007 21:51:54 +0000 (+0000) Subject: * added flag to make clients add a subject X-Git-Tag: v7.86~3287 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=6a11ed1e58e6574a41205b1963065f37c5e04f12;p=citadel.git * added flag to make clients add a subject * create every room of type 'mailbox' this way * added modified reply to ENT0 that indicates the flag. --- diff --git a/citadel/ipcdef.h b/citadel/ipcdef.h index 968be0134..c052f781a 100644 --- a/citadel/ipcdef.h +++ b/citadel/ipcdef.h @@ -56,6 +56,7 @@ extern "C" { #define QR2_SYSTEM 1 /* System room; hide by default */ #define QR2_SELFLIST 2 /* Self-service mailing list mgmt */ #define QR2_COLLABDEL 4 /* Anyone who can post can delete */ +#define QR2_SUBJECTREQ 8 /* Subject strongly recommended */ #define US_NEEDVALID 1 /* User needs to be validated */ #define US_EXTEDIT 2 /* Always use external editor */ diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 4f80ff02f..dc0823e58 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -3520,8 +3520,10 @@ void cmd_ent0(char *entargs) * success without creating the message. */ if (post == 0) { - cprintf("%d %s\n", CIT_OK, - ((valid_to != NULL) ? valid_to->display_recp : "") ); + cprintf("%d %s|%s\n", CIT_OK, + ((valid_to != NULL) ? valid_to->display_recp : ""), + ((CC->room.QRflags2 & QR2_SUBJECTREQ)? + "SUBJECTREQ" : "SUBJECTOPT") ); free_recipients(valid_to); free_recipients(valid_cc); free_recipients(valid_bcc); diff --git a/citadel/room_ops.c b/citadel/room_ops.c index ffe2078f9..cc83b369b 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1756,8 +1756,10 @@ unsigned create_room(char *new_room_name, qrbuf.QRflags = (qrbuf.QRflags | QR_GUESSNAME); if (new_room_type == 2) qrbuf.QRflags = (qrbuf.QRflags | QR_PASSWORDED); - if ( (new_room_type == 4) || (new_room_type == 5) ) + if ( (new_room_type == 4) || (new_room_type == 5) ) { qrbuf.QRflags = (qrbuf.QRflags | QR_MAILBOX); + qrbuf.QRflags2 |= QR2_SUBJECTREQ; + } /* If the user is requesting a personal room, set up the room * name accordingly (prepend the user number)