Added message when bluewave mail is imported

This commit is contained in:
Andrew Pamment 2016-12-07 20:04:42 +10:00
parent 14ecc81951
commit 496e957527
2 changed files with 26 additions and 15 deletions

View File

@ -559,6 +559,9 @@ void bwave_upload_reply() {
FILE *upl_file;
FILE *msg_file;
int sem_fd;
int msg_count;
msg_count = 0;
snprintf(buffer, 1024, "%s/node%d", conf.bbs_path, mynode);
@ -661,11 +664,12 @@ void bwave_upload_reply() {
addr.net = converts(upl_rec.destnet);
addr.node = converts(upl_rec.destnode);
addr.zone = converts(upl_rec.destpoint);
netmail = 1;
} else if (conf.mail_conferences[confr]->mail_areas[area]->type == TYPE_ECHOMAIL_AREA) {
if (msg_attr & UPL_PRIVATE) {
continue;
}
echomail = 1;
} else { // Local area
if (msg_attr & UPL_PRIVATE) {
continue;
@ -726,17 +730,7 @@ void bwave_upload_reply() {
// failed to add message
s_printf(get_string(197));
} else {
if (conf.mail_conferences[confr]->mail_areas[area]->type == TYPE_NETMAIL_AREA) {
if (conf.netmail_sem != NULL) {
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
close(sem_fd);
}
} else if (conf.mail_conferences[confr]->mail_areas[area]->type == TYPE_ECHOMAIL_AREA) {
if (conf.echomail_sem != NULL) {
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
close(sem_fd);
}
}
msg_count++;
}
free(body);
@ -747,9 +741,25 @@ void bwave_upload_reply() {
snprintf(buffer, 1024, "%s/node%d/bwave/", conf.bbs_path, mynode);
recursive_delete(buffer);
if (netmail == 1) {
if (conf.netmail_sem != NULL) {
sem_fd = open(conf.netmail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
close(sem_fd);
}
}
if (echomail == 1) {
if (conf.echomail_sem != NULL) {
sem_fd = open(conf.echomail_sem, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
close(sem_fd);
}
}
s_printf("\r\n");
if (msg_count > 0) {
s_printf(get_string(204), msg_count);
}
s_printf(get_string(6));
s_getc();
}

View File

@ -202,3 +202,4 @@ Is this Correct? (Y/N)
...Found!\r\n\r\n
\e[1;32mUpload Successful!\e[0m\r\n
\e[1;31mUser not found! Assuming new user...\e[0m\r\n\r\n
\e[1;32mSuccesfully processed \e[1;37m%d \e[1;32mmessages!\r\n\e[0m