Added message when bluewave mail is imported
This commit is contained in:
parent
14ecc81951
commit
496e957527
36
bluewave.c
36
bluewave.c
@ -559,6 +559,9 @@ void bwave_upload_reply() {
|
|||||||
FILE *upl_file;
|
FILE *upl_file;
|
||||||
FILE *msg_file;
|
FILE *msg_file;
|
||||||
int sem_fd;
|
int sem_fd;
|
||||||
|
int msg_count;
|
||||||
|
|
||||||
|
msg_count = 0;
|
||||||
|
|
||||||
snprintf(buffer, 1024, "%s/node%d", conf.bbs_path, mynode);
|
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.net = converts(upl_rec.destnet);
|
||||||
addr.node = converts(upl_rec.destnode);
|
addr.node = converts(upl_rec.destnode);
|
||||||
addr.zone = converts(upl_rec.destpoint);
|
addr.zone = converts(upl_rec.destpoint);
|
||||||
|
netmail = 1;
|
||||||
} else if (conf.mail_conferences[confr]->mail_areas[area]->type == TYPE_ECHOMAIL_AREA) {
|
} else if (conf.mail_conferences[confr]->mail_areas[area]->type == TYPE_ECHOMAIL_AREA) {
|
||||||
if (msg_attr & UPL_PRIVATE) {
|
if (msg_attr & UPL_PRIVATE) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
echomail = 1;
|
||||||
} else { // Local area
|
} else { // Local area
|
||||||
if (msg_attr & UPL_PRIVATE) {
|
if (msg_attr & UPL_PRIVATE) {
|
||||||
continue;
|
continue;
|
||||||
@ -726,17 +730,7 @@ void bwave_upload_reply() {
|
|||||||
// failed to add message
|
// failed to add message
|
||||||
s_printf(get_string(197));
|
s_printf(get_string(197));
|
||||||
} else {
|
} else {
|
||||||
if (conf.mail_conferences[confr]->mail_areas[area]->type == TYPE_NETMAIL_AREA) {
|
msg_count++;
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(body);
|
free(body);
|
||||||
@ -747,9 +741,25 @@ void bwave_upload_reply() {
|
|||||||
snprintf(buffer, 1024, "%s/node%d/bwave/", conf.bbs_path, mynode);
|
snprintf(buffer, 1024, "%s/node%d/bwave/", conf.bbs_path, mynode);
|
||||||
recursive_delete(buffer);
|
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");
|
s_printf("\r\n");
|
||||||
|
|
||||||
|
if (msg_count > 0) {
|
||||||
|
s_printf(get_string(204), msg_count);
|
||||||
|
}
|
||||||
|
|
||||||
s_printf(get_string(6));
|
s_printf(get_string(6));
|
||||||
s_getc();
|
s_getc();
|
||||||
}
|
}
|
||||||
|
@ -202,3 +202,4 @@ Is this Correct? (Y/N)
|
|||||||
...Found!\r\n\r\n
|
...Found!\r\n\r\n
|
||||||
\e[1;32mUpload Successful!\e[0m\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;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
|
||||||
|
Reference in New Issue
Block a user