diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-02 00:37:54 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-02 00:37:54 +0800 |
commit | 78f43e8c18e2ad103ee3fc20490d6e29a50f9331 (patch) | |
tree | 24ec9651ae258ed04eaa2427d0c9c4f2851e4bed | |
parent | 8c49555a1861b32024b35e4a89b4b696107e3c48 (diff) | |
download | pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.tar pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.tar.gz pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.tar.bz2 pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.tar.lz pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.tar.xz pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.tar.zst pttbbs-78f43e8c18e2ad103ee3fc20490d6e29a50f9331.zip |
- make Test as macro name
- general message update and finetune
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3770 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | include/bbs.h | 1 | ||||
-rw-r--r-- | include/config.h | 4 | ||||
-rw-r--r-- | include/proto.h | 6 | ||||
-rw-r--r-- | mbbsd/bbs.c | 11 | ||||
-rw-r--r-- | mbbsd/mail.c | 5 | ||||
-rw-r--r-- | mbbsd/user.c | 4 | ||||
-rw-r--r-- | sample/pttbbs.conf | 2 |
7 files changed, 25 insertions, 8 deletions
diff --git a/include/bbs.h b/include/bbs.h index ead0861e..b004b601 100644 --- a/include/bbs.h +++ b/include/bbs.h @@ -31,6 +31,7 @@ extern "C" { #include <sys/time.h> #include <sys/resource.h> #include <netinet/in.h> +#include <netinet/tcp.h> #include <arpa/inet.h> #include <arpa/telnet.h> #include <sys/types.h> diff --git a/include/config.h b/include/config.h index 95452f67..58ad758e 100644 --- a/include/config.h +++ b/include/config.h @@ -53,6 +53,10 @@ #define GLOBAL_NEWBIE BBSMNAME "Newhand" #endif +#ifndef GLOBAL_TEST +#define GLOBAL_TEST "Test" +#endif + #ifndef GLOBAL_NOTE #define GLOBAL_NOTE "Note" #endif diff --git a/include/proto.h b/include/proto.h index d7d353db..2332e7b4 100644 --- a/include/proto.h +++ b/include/proto.h @@ -791,6 +791,12 @@ int Goodbye(void); /* toolkit */ unsigned DBCS_StringHash(const char *s); +/* recycle */ +// public +int RcyAddFile(const fileheader_t *fhdr, int bid, const char *fpath); +int RcyAddDir (const fileheader_t *fhdr, int bid, const char *direct); +int RcyRecycleBin(void); + /* passwd */ int passwd_init(void); int passwd_update(int num, userec_t *buf); diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 3d381abe..66fc4316 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -668,8 +668,8 @@ do_deleteCrossPost(const fileheader_t *fh, char bname[]) else #endif delete_record(bdir, sizeof(fileheader_t), i); - unlink(file); setbtotal(bid); + unlink(file); } } @@ -1083,7 +1083,7 @@ do_general(int isbid) if (aborted > MAX_POST_MONEY) aborted = MAX_POST_MONEY; #endif - if (strcmp(currboard, "Test") && !ifuseanony && + if (strcmp(currboard, GLOBAL_TEST) && !ifuseanony && !(currbrdattr&BRD_BAD)) { prints("這是您的第 %d 篇文章。",++cuser.numposts); if(postfile.filemode&FILE_BID) @@ -1789,7 +1789,7 @@ cross_post(int ent, fileheader_t * fhdr, const char *direct) // anti-crosspost spammers: do not add numpost. #if 0 - if (strcmp(xboard, "Test") == 0) + if (strcmp(xboard, GLOBAL_TEST) == 0) outs("測試信件不列入紀錄,敬請包涵。"); else cuser.numposts++; @@ -3076,14 +3076,15 @@ del_post(int ent, fileheader_t * fhdr, char *direct) if (fhdr->multi.money < 0 || fhdr->filemode & FILE_ANONYMOUS) fhdr->multi.money = 0; if (not_owned && tusernum && fhdr->multi.money > 0 && - strcmp(currboard, "Test") && strcmp(currboard, ALLPOST)) { + strcmp(currboard, GLOBAL_TEST) && + strcmp(currboard, ALLPOST)) { deumoney(tusernum, -fhdr->multi.money); #ifdef USE_COOLDOWN if (bp->brdattr & BRD_COOLDOWN) add_cooldowntime(tusernum, 15); #endif } - if (!not_owned && strcmp(currboard, "Test") && + if (!not_owned && strcmp(currboard, GLOBAL_TEST) && strcmp(currboard, ALLPOST)) { if (cuser.numposts) cuser.numposts--; diff --git a/mbbsd/mail.c b/mbbsd/mail.c index ac4be139..5e6ead31 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -1059,6 +1059,9 @@ mail_del(int ent, const fileheader_t * fhdr, const char *direct) if (!delete_record(direct, sizeof(*fhdr), ent)) { setupmailusage(); setdirpath(genbuf, direct, fhdr->filename); +#ifdef USE_RECYCLE + RcyAddFile(fhdr, 0, genbuf); +#endif // USE_RECYCLE unlink(genbuf); mailsum = mailkeep = 0; return DIRCHANGED; @@ -1406,7 +1409,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, const char *direct) add_posttimes(usernum, 1); #endif - if (strcmp(xboard, "Test") == 0) + if (strcmp(xboard, GLOBAL_TEST) == 0) outs("測試信件不列入紀錄,敬請包涵。"); else cuser.numposts++; diff --git a/mbbsd/user.c b/mbbsd/user.c index b7fb4e6a..8645ab62 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -1403,7 +1403,7 @@ toregister(char *email, char *genbuf, char *phone, char *career, "\n" " 2.若您沒有 E-Mail 或是一直無法收到認證信, 請輸入 x \n" " 會有站長親自人工審核註冊資料," ANSI_COLOR(1;33) - "但注意這可能會花上數天或更多時間。" ANSI_RESET "\n" + "但注意這可能會花上數週或更多時間。" ANSI_RESET "\n" "**********************************************************\n" "* 注意! *\n" "* 通常應該會在輸入完成後十分鐘內收到認證信, 若過久未收到 *\n" @@ -1449,7 +1449,7 @@ toregister(char *email, char *genbuf, char *phone, char *career, move(15, 0); clrtobot(); move(17, 0); outs("指定的 E-Mail 不合法, 若您無 E-Mail 請輸入 x 由站長手動認證\n"); - outs("但注意手動認證通常會花上數天的時間。\n"); + outs("但注意手動認證通常會花上數週以上的時間。\n"); } } strlcpy(cuser.email, email, sizeof(cuser.email)); diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index b54c4c5d..a8415603 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -43,6 +43,8 @@ /* SYSOP 板 */ #define GLOBAL_SYSOP "SYSOP" +/* 測試板 */ +#define GLOBAL_TEST "Test" /* 發生錯誤時建議的回報板名為此板 */ #define GLOBAL_BUGREPORT BBSMNAME "Bug" /* 法律訴訟的板 */ |