Fix MSG_ in www_msgs.c and new Makefile for OSX with WWW Server

This commit is contained in:
Andrew Pamment 2017-03-16 17:57:03 +10:00
parent fcad3457ed
commit 37bad93bcd
2 changed files with 23 additions and 4 deletions

19
Makefile.osx.WWW Normal file
View File

@ -0,0 +1,19 @@
CC=cc
CFLAGS=-I/opt/local/include -DENABLE_WWW=1
DEPS = bbs.h
JAMLIB = jamlib/jamlib.a
ZMODEM = Xmodem/libzmodem.a
LUA = lua/liblua.a
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 bluewave.o hashmap/hashmap.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
magicka: $(OBJ)
$(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -ldl -lssl -lcrypto -lssh $(MICROHTTPD)
.PHONY: clean
clean:
rm -f $(OBJ) magicka

View File

@ -284,7 +284,7 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
JAM_CloseMB(jb);
return NULL;
}
if (jmh.Attribute & MSG_DELETED) {
if (jmh.Attribute & JAM_MSG_DELETED) {
JAM_DelSubPacket(jsp);
JAM_CloseMB(jb);
return NULL;
@ -333,7 +333,7 @@ char *www_msgs_messageview(struct user_record *user, int conference, int area, i
subject = strdup("(No Subject)");
}
if (jmh.Attribute & 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) &&
!msg_is_from(user, from, oaddress, conf.mail_conferences[conference]->nettype, conf.mail_conferences[conference]->realnames, conference)) {
@ -688,7 +688,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
JAM_ClearMsgHeader( &jmh );
jmh.DateWritten = (uint32_t)time(NULL);
jmh.Attribute |= MSG_LOCAL;
jmh.Attribute |= JAM_MSG_LOCAL;
if (conf.mail_conferences[conference]->realnames == 0) {
if (conf.mail_conferences[conference]->nettype == NETWORK_WWIV) {
@ -724,7 +724,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference,
JAM_PutSubfield(jsp, &jsf);
if (conf.mail_conferences[conference]->mail_areas[area]->type == TYPE_ECHOMAIL_AREA) {
jmh.Attribute |= MSG_TYPEECHO;
jmh.Attribute |= JAM_MSG_TYPEECHO;
if (conf.mail_conferences[conference]->nettype == NETWORK_FIDO) {
if (conf.mail_conferences[conference]->fidoaddr->point) {