char *display_name;
struct wc_attachment *att;
int recipient_required = 0;
+ int subject_required = 0;
int recipient_bad = 0;
int i;
int is_anonymous = 0;
/** First test to see whether this is a room that requires recipients to be entered */
serv_puts("ENT0 0");
serv_getln(buf, sizeof buf);
+
if (!strncmp(buf, "570", 3)) { /** 570 means that we need a recipient here */
recipient_required = 1;
}
return;
}
+ if ((buf[3] != '\0') &&
+ (buf[4] != '\0') &&
+ !strncmp(&(buf[5]), "SUBJECTREQ", 10)) {
+ subject_required = 1;
+ }
+
/**
* Are we perhaps in an address book view? If so, then an "enter
* message" command really means "add new entry."
}
wprintf("<div style=\"clear: both;\"><label for=\"subject_id\" > ");
- if (recipient_required) {
+ if (recipient_required || subject_required) {
wprintf(_("Subject:"));
}
else {
wprintf("> ");
wprintf(_("Permanent (does not auto-purge)"));
+ wprintf("\n<LI><INPUT TYPE=\"checkbox\" NAME=\"subjectreq\" VALUE=\"yes\" ");
+ if (er_flags2 & QR2_SUBJECTREQ)
+ wprintf("CHECKED ");
+ wprintf("> ");
+ wprintf(_("Subject Required (Force users to specify a message subject)"));
+
/** start of anon options */
wprintf("\n<LI>");
er_flags &= ~QR_PERMANENT;
}
+ if (!strcmp(bstr("subjectreq"), "yes")) {
+ er_flags2 |= QR2_SUBJECTREQ;
+ } else {
+ er_flags2 &= ~QR2_SUBJECTREQ;
+ }
+
if (!strcmp(bstr("network"), "yes")) {
er_flags |= QR_NETWORK;
} else {
#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 also delete*/
+#define QR2_SUBJECTREQ 8 /**< Subject strongly recommended */
/**
* user/room access