Merge branch 'master' of https://github.com/apamment/MagickaBBS
This commit is contained in:
commit
24ea37c001
@ -4,14 +4,13 @@ DEPS = bbs.h
|
|||||||
JAMLIB = jamlib/jamlib.a
|
JAMLIB = jamlib/jamlib.a
|
||||||
ZMODEM = Xmodem/libzmodem.a
|
ZMODEM = Xmodem/libzmodem.a
|
||||||
LUA = lua/liblua.a
|
LUA = lua/liblua.a
|
||||||
MICROHTTPD=
|
|
||||||
|
|
||||||
OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o www.o
|
OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o bluewave.o
|
||||||
%.o: %.c $(DEPS)
|
%.o: %.c $(DEPS)
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
magicka: $(OBJ)
|
magicka: $(OBJ)
|
||||||
$(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -lssl -lcrypto -lssh $(MICROHTTPD)
|
$(CC) -o magicka -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -lssl -lcrypto -lssh
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ ZMODEM = Xmodem/libzmodem.a
|
|||||||
LUA = lua/liblua.a
|
LUA = lua/liblua.a
|
||||||
MICROHTTPD=-lmicrohttpd -lb64
|
MICROHTTPD=-lmicrohttpd -lb64
|
||||||
|
|
||||||
OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o www.o www_email.o www_msgs.o www_last10.o
|
OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o strings.o bluewave.o www.o www_email.o www_msgs.o www_last10.o
|
||||||
%.o: %.c $(DEPS)
|
%.o: %.c $(DEPS)
|
||||||
$(CC) -c -o $@ $< $(CFLAGS)
|
$(CC) -c -o $@ $< $(CFLAGS)
|
||||||
|
|
||||||
|
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