diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-01-21 23:14:49 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-01-21 23:14:49 +0800 |
commit | cde22406e9ddfed601e58bc3d1344b49a2348094 (patch) | |
tree | 36b646c82f532130571d096b8ea14cc650ba31fa | |
parent | d219b0b2ca75f949f5b3092ff3e05c017bfc1ae0 (diff) | |
download | pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.tar pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.tar.gz pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.tar.bz2 pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.tar.lz pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.tar.xz pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.tar.zst pttbbs-cde22406e9ddfed601e58bc3d1344b49a2348094.zip |
Apply editLimits change to all place.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5774 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 16 | ||||
-rw-r--r-- | pttbbs/mbbsd/name.c | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index a1147544..6b5a85a7 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -2510,10 +2510,18 @@ do_limitedit(int ent, fileheader_t * fhdr, const char *direct) } else if (buf[0] == 'b') { +#ifdef USE_POSTLIMIT_NUMPOSTS editLimits( &bp->vote_limit_logins, &bp->vote_limit_posts, &bp->vote_limit_badpost); +#else + editLimits( + &bp->vote_limit_logins, + NULL, + &bp->vote_limit_badpost); + bp->vote_limit_posts = 0; +#endif assert(0<=currbid-1 && currbid-1<MAX_BOARD); substitute_record(fn_board, bp, sizeof(boardheader_t), currbid); @@ -2523,10 +2531,18 @@ do_limitedit(int ent, fileheader_t * fhdr, const char *direct) } else if ((fhdr->filemode & FILE_VOTE) && buf[0] == 'c') { +#ifdef USE_POSTLIMIT_NUMPOSTS editLimits( &fhdr->multi.vote_limits.logins, &fhdr->multi.vote_limits.posts, &fhdr->multi.vote_limits.badpost); +#else + editLimits( + &fhdr->multi.vote_limits.logins, + NULL, + &fhdr->multi.vote_limits.badpost); + fhdr->multi.vote_limits.posts = 0; +#endif // TODO fix race condition here. substitute_ref_record(direct, fhdr, ent); diff --git a/pttbbs/mbbsd/name.c b/pttbbs/mbbsd/name.c index dd885999..e71e73c4 100644 --- a/pttbbs/mbbsd/name.c +++ b/pttbbs/mbbsd/name.c @@ -186,6 +186,8 @@ usercomplete(const char *prompt, char *data) usercomplete2(prompt, data, NULL); } +// General Complete: used for boards and online users. + static int gnc_findbound(char *str, int *START, int *END, size_t nmemb, gnc_comp_func compar) |