Check realnames and alias when determining who a message is for

This commit is contained in:
Andrew Pamment 2017-04-14 14:42:14 +10:00
parent 61e43ca45c
commit 34d9fff953
3 changed files with 15 additions and 11 deletions

View File

@ -21,7 +21,7 @@ If you want to install Magicka BBS, follow these steps.
3. Build the BBS (You may have to adjust the Makefile for your system) 3. Build the BBS (You may have to adjust the Makefile for your system)
`make -f Makefile.linux` (Linux) `gmake -f Makefile.freebsd` (FreeBSD) `make -f Makefile.osx` (macOS) `make -f Makefile.netbsd` (NetBSD) `make -f Makefile.linux` (Linux) `gmake -f Makefile.freebsd` (FreeBSD) `make -f Makefile.osx` (macOS) `gmake -f Makefile.netbsd` (NetBSD)
4. Make a directory for logs. 4. Make a directory for logs.

View File

@ -287,7 +287,9 @@ struct msg_headers *read_message_headers(int msgconf, int msgarea, struct user_r
if (jmh.Attribute & JAM_MSG_PRIVATE) { if (jmh.Attribute & JAM_MSG_PRIVATE) {
if (!msg_is_to(user, jamm->to, jamm->daddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) && if (!msg_is_to(user, jamm->to, jamm->daddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) &&
!msg_is_from(user, jamm->from, jamm->oaddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf)) { !msg_is_from(user, jamm->from, jamm->oaddress, conf.mail_conferences[msgconf]->nettype, conf.mail_conferences[msgconf]->realnames, msgconf) &&
!msg_is_to(user, jamm->to, jamm->daddress, conf.mail_conferences[msgconf]->nettype, !conf.mail_conferences[msgconf]->realnames, msgconf) &&
!msg_is_from(user, jamm->from, jamm->oaddress, conf.mail_conferences[msgconf]->nettype, !conf.mail_conferences[msgconf]->realnames, msgconf)) {
if (jamm->subject != NULL) { if (jamm->subject != NULL) {
free(jamm->subject); free(jamm->subject);

View File

@ -342,7 +342,9 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
if (jmh.Attribute & JAM_MSG_PRIVATE) { if (jmh.Attribute & JAM_MSG_PRIVATE) {
if (!msg_is_to(user, to, daddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) && if (!msg_is_to(user, to, daddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) &&
!msg_is_from(user, from, oaddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference)) { !msg_is_from(user, from, oaddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference) &&
!msg_is_to(user, to, daddress, conf.mail_conferences[conference]->nettype, !conf.mail_conferences[conference]->realnames, conference) &&
!msg_is_from(user, from, oaddress, conf.mail_conferences[conference]->nettype, !conf.mail_conferences[conference]->realnames, conference)) {
if (subject != NULL) { if (subject != NULL) {
free(subject); free(subject);