diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/Makefile | 6 | ||||
-rw-r--r-- | mbbsd/emaildb.c | 5 | ||||
-rw-r--r-- | mbbsd/mail.c | 6 | ||||
-rw-r--r-- | mbbsd/register.c | 6 |
4 files changed, 16 insertions, 7 deletions
diff --git a/mbbsd/Makefile b/mbbsd/Makefile index f5ea4269..1572bc0a 100644 --- a/mbbsd/Makefile +++ b/mbbsd/Makefile @@ -51,8 +51,10 @@ OBJS+= bbslua.o bbsluaext.o CFLAGS+= -DUSE_BBSLUA # MODIFY THESE ENVIRONMENT SETTINGS TO FIT YOUR CONFIGURATION .if $(OSTYPE)=="FreeBSD" -CFLAGS:= ${CFLAGS} ${:!pkg-config --cflags lua-5.1!} -LDLIBS:= ${LDLIBS} ${:!pkg-config --libs lua-5.1!} +CFLAGS:= ${CFLAGS} -I/usr/local/include/lua51 +#${:!pkg-config --cflags lua-5.1!} +LDLIBS:= ${LDLIBS} -L/usr/local/lib/lua51 -llua -lm +#${:!pkg-config --libs lua-5.1!} .else CFLAGS:= ${CFLAGS} ${:!pkg-config --cflags lua5.1!} LDLIBS:= ${LDLIBS} ${:!pkg-config --libs lua5.1!} diff --git a/mbbsd/emaildb.c b/mbbsd/emaildb.c index a5ff2ee7..c9313baf 100644 --- a/mbbsd/emaildb.c +++ b/mbbsd/emaildb.c @@ -89,6 +89,11 @@ end: if (Db != NULL) sqlite3_close(Db); + // XXX exit() can only hold 0~255 for WEXISTSTATUS + assert(127 >= EMAILDB_LIMIT); + if (count > 127) + count = 127; + if (pid == 0) exit(count); diff --git a/mbbsd/mail.c b/mbbsd/mail.c index f899b673..aafd9f16 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -393,7 +393,7 @@ hold_mail(const char *fpath, const char *receiver, const char *title) } int -do_innersend(const char *userid, char *mfpath, const char *title) +do_innersend(const char *userid, char *mfpath, const char *title, char *newtitle) { fileheader_t mhdr; char fpath[PATHLEN]; @@ -419,6 +419,7 @@ do_innersend(const char *userid, char *mfpath, const char *title) } strlcpy(mhdr.title, save_title, sizeof(mhdr.title)); + if (newtitle) strlcpy(newtitle, save_title, STRLEN); sethomefile(fpath, userid, FN_OVERRIDES); i = file_exist_record(fpath, cuser.userid); sethomefile(fpath, userid, FN_REJECT); @@ -498,7 +499,8 @@ do_send(const char *userid, const char *title) } else { - ret = do_innersend(userid, fpath, save_title); + // XXX the title maybe changed inside do_innersend... + ret = do_innersend(userid, fpath, save_title, save_title); if (ret == 0) // success hold_mail(fpath, userid, save_title); diff --git a/mbbsd/register.c b/mbbsd/register.c index e0ef1609..713163af 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -1068,7 +1068,7 @@ check_register(void) setuserfile(quote_file, FN_REJECT_NOTIFY); strlcpy(quote_user, "[退註通知]", sizeof(quote_user)); clear(); - do_innersend(u.userid, NULL, "[註冊問題] 退註相關問題"); + do_innersend(u.userid, NULL, "[註冊問題] 退註相關問題", NULL); abort = 1; // quick return to avoid confusing user unlink(fn); @@ -1211,7 +1211,7 @@ toregister(char *email) if (email_count < 0) { move(15, 0); clrtobot(); move(17, 0); - outs("email 認證系統發生問題, 請稍後再試。\n"); + outs("email 認證系統發生問題, 請稍後再試,或輸入 x 採手動認證。\n"); pressanykey(); return; } else if (email_count >= EMAILDB_LIMIT) { @@ -1248,7 +1248,7 @@ toregister(char *email) emaildb_update_email(cuser.userid, strlen(cuser.userid), email, strlen(email)) < 0) { move(15, 0); clrtobot(); move(17, 0); - outs("暫時不允許\ email 認證註冊, 請稍後再試\n"); + outs("email 認證系統發生問題, 請稍後再試,或輸入 x 採手動認證。\n"); pressanykey(); return; } |