From cde22406e9ddfed601e58bc3d1344b49a2348094 Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 21 Jan 2013 15:14:49 +0000 Subject: Apply editLimits change to all place. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5774 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/bbs.c | 16 ++++++++++++++++ pttbbs/mbbsd/name.c | 2 ++ 2 files changed, 18 insertions(+) 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-1filemode & 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) -- cgit v1.2.3