summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c20
-rw-r--r--mbbsd/board.c15
-rw-r--r--mbbsd/voteboard.c5
3 files changed, 3 insertions, 37 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 7829bed9..528e61b4 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -399,8 +399,6 @@ int CheckPostRestriction(int bid)
// check first-login
if (cuser.firstlogin > (now - (time4_t)bp->post_limit_regtime * MONTH_SECONDS))
return 0;
- if (cuser.numlogins / 10 < (unsigned int)bp->post_limit_logins)
- return 0;
// XXX numposts itself is an integer, but some records (by del post!?) may
// create invalid records as -1... so we'd better make it signed for real
// comparison.
@@ -1967,8 +1965,7 @@ read_post(int ent, fileheader_t * fhdr, const char *direct)
}
void
-editLimits(unsigned char *pregtime, unsigned char *plogins,
- unsigned char *pposts, unsigned char *pbadpost)
+editLimits(unsigned char *pregtime, unsigned char *pposts, unsigned char *pbadpost)
{
char genbuf[STRLEN];
int temp;
@@ -1976,7 +1973,6 @@ editLimits(unsigned char *pregtime, unsigned char *plogins,
// load var
unsigned char
regtime = *pregtime,
- logins = *plogins,
posts = *pposts,
badpost = *pbadpost;
@@ -1989,14 +1985,6 @@ editLimits(unsigned char *pregtime, unsigned char *plogins,
} while (temp < 0 || temp > 255);
regtime = (unsigned char)temp;
- sprintf(genbuf, "%u", logins*10);
- do {
- getdata_buf(b_lines - 1, 0,
- "上站次數下限 (0~2550,以10為單位,個位數字將自動捨去):", genbuf, 5, NUMECHO);
- temp = atoi(genbuf);
- } while (temp < 0 || temp > 2550);
- logins = (unsigned char)(temp / 10);
-
sprintf(genbuf, "%u", posts*10);
do {
getdata_buf(b_lines - 1, 0,
@@ -2015,7 +2003,6 @@ editLimits(unsigned char *pregtime, unsigned char *plogins,
// save var
*pregtime = regtime;
- *plogins = logins;
*pposts = posts;
*pbadpost = badpost;
}
@@ -2044,7 +2031,6 @@ do_limitedit(int ent, fileheader_t * fhdr, const char *direct)
editLimits(
&bp->post_limit_regtime,
- &bp->post_limit_logins,
&bp->post_limit_posts,
&bp->post_limit_badpost);
@@ -2058,7 +2044,6 @@ do_limitedit(int ent, fileheader_t * fhdr, const char *direct)
editLimits(
&bp->vote_limit_regtime,
- &bp->vote_limit_logins,
&bp->vote_limit_posts,
&bp->vote_limit_badpost);
@@ -2072,7 +2057,6 @@ do_limitedit(int ent, fileheader_t * fhdr, const char *direct)
editLimits(
&fhdr->multi.vote_limits.regtime,
- &fhdr->multi.vote_limits.logins,
&fhdr->multi.vote_limits.posts,
&fhdr->multi.vote_limits.badpost);
@@ -2974,7 +2958,7 @@ del_post(int ent, fileheader_t * fhdr, char *direct)
snprintf(reason, sizeof(reason), "(已被%s刪除) <%s>",
cuser.userid, fhdr->owner);
move(3, 0); clrtoeol();
- getdata_str(2, 0, " >> 請輸入刪除後要顯示的標題: ■ ",
+ getdata_str(2, 0, " >> 請輸入刪除後要顯示的標題: □ ",
reason, sizeof(reason), DOECHO, reason);
if (!reason[0])
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 7bfa3d22..5bf159c6 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -311,8 +311,7 @@ b_config(void)
while(!finished) {
// limits
- uint8_t llogin = bp->post_limit_logins,
- lpost = bp->post_limit_posts,
+ uint8_t lpost = bp->post_limit_posts,
lreg = bp->post_limit_regtime,
lbp = bp->post_limit_badpost;
@@ -439,23 +438,11 @@ b_config(void)
if (bp->brdattr & BRD_VOTEBOARD)
{
- llogin = bp->vote_limit_logins;
lpost = bp->vote_limit_posts;
lreg = bp->vote_limit_regtime;
lbp = bp->vote_limit_badpost;
}
- if (llogin)
- {
- move_ansi(ipostres++, COLPOSTRES);
- i = (int)llogin * 10;
- attr = (cuser.numlogins < i) ? 1 : 0;
- if (attr) outs(ANSI_COLOR(1;31));
- prints("上站次數 %d 次以上", i);
- if (attr) outs(ANSI_RESET);
- hasres = 1;
- }
-
if (lpost)
{
move_ansi(ipostres++, COLPOSTRES);
diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c
index 1cc08bb5..50c6053d 100644
--- a/mbbsd/voteboard.c
+++ b/mbbsd/voteboard.c
@@ -12,8 +12,6 @@ int CheckVoteRestriction(int bid)
// check first-login
if (cuser.firstlogin > (now - (time4_t)bcache[bid - 1].vote_limit_regtime * MONTH_SECONDS))
return 0;
- if (cuser.numlogins / 10 < (unsigned int)bcache[bid - 1].vote_limit_logins)
- return 0;
if (cuser.numposts / 10 < (unsigned int)bcache[bid - 1].vote_limit_posts)
return 0;
if (cuser.badpost > (255 - (unsigned int)bcache[bid - 1].vote_limit_badpost))
@@ -31,8 +29,6 @@ int CheckVoteRestrictionFile(const fileheader_t * fhdr)
// check first-login
if (cuser.firstlogin > (now - (time4_t)fhdr->multi.vote_limits.regtime * MONTH_SECONDS))
return 0;
- if (cuser.numlogins / 10 < (unsigned int)fhdr->multi.vote_limits.logins)
- return 0;
if (cuser.numposts / 10 < (unsigned int)fhdr->multi.vote_limits.posts)
return 0;
if (cuser.badpost > (255 - (unsigned int)fhdr->multi.vote_limits.badpost))
@@ -396,7 +392,6 @@ do_voteboard(int type)
/* use lower 16 bits of 'money' to store limits */
/* lower 8 bits are posts, higher 8 bits are logins */
votefile.multi.vote_limits.regtime = bcache[currbid - 1].vote_limit_regtime;
- votefile.multi.vote_limits.logins = bcache[currbid - 1].vote_limit_logins;
votefile.multi.vote_limits.posts = bcache[currbid - 1].vote_limit_posts;
votefile.multi.vote_limits.badpost = bcache[currbid - 1].vote_limit_badpost;
setbdir(genbuf, currboard);