summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-09 15:54:23 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-09 15:54:23 +0800
commit81714aa12e87b72e4dcddde246afb8011f7b06f0 (patch)
tree041074802eab33512bed5f56a8b32f0e963a111a /mbbsd/bbs.c
parent73f65e2da445e7d70abe3f558275bc80928ecddf (diff)
downloadpttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.tar
pttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.tar.gz
pttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.tar.bz2
pttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.tar.lz
pttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.tar.xz
pttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.tar.zst
pttbbs-81714aa12e87b72e4dcddde246afb8011f7b06f0.zip
only SYSOPs can change post limit
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2392 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index d197b1b1..2bb56bed 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1138,19 +1138,22 @@ read_post(int ent, fileheader_t * fhdr, char *direct)
int
do_limitedit(int ent, fileheader_t * fhdr, char *direct)
{
- char genbuf[256];
+ char genbuf[256], buf[256];
int temp;
boardheader_t *bp = NULL;
if (!((currmode & MODE_BOARD) || HAS_PERM(PERM_SYSOP)))
return DONOTHING;
bp = getbcache(currbid);
- if (fhdr->filemode & FILE_VOTE)
- getdata(23, 0, "更改 (A)本板發表限制 (B)本板預設 (C)本篇連署限制 (Q)取消?[Q]", genbuf, 3, LCECHO);
- else
- getdata(23, 0, "更改 (A)本板發表限制 (B)本板預設連署限制 (Q)取消?[Q]", genbuf, 3, LCECHO);
-
- if (genbuf[0] == 'a' || genbuf[0] == 'A') {
+
+ strcpy(buf, "更改 ");
+ if (HAS_PERM(PERM_SYSOP)) strcat(buf, "(A)本板發表限制 ");
+ strcat(buf, "(B)本板預設");
+ if (fhdr->filemode & FILE_VOTE) strcat(buf, " (C)本篇");
+ strcat(buf, "連署限制 (Q)取消?[Q]");
+ getdata(23, 0, buf, genbuf, 3, LCECHO);
+
+ if (HAS_PERM(PERM_SYSOP) && genbuf[0] == 'a') {
sprintf(genbuf, "%u", bp->post_limit_logins * 10);
do {
getdata_buf(23, 0, "上站次數下限 (0~2550):", genbuf, 5, LCECHO);
@@ -1169,7 +1172,7 @@ do_limitedit(int ent, fileheader_t * fhdr, char *direct)
vmsg("修改完成!");
return FULLUPDATE;
}
- else if (genbuf[0] == 'b' || genbuf[0] == 'B') {
+ else if (genbuf[0] == 'b') {
sprintf(genbuf, "%u", bp->vote_limit_logins * 10);
do {
getdata_buf(23, 0, "上站次數下限 (0~2550):", genbuf, 5, LCECHO);
@@ -1188,7 +1191,7 @@ do_limitedit(int ent, fileheader_t * fhdr, char *direct)
vmsg("修改完成!");
return FULLUPDATE;
}
- else if ((fhdr->filemode & FILE_VOTE) && (genbuf[0] == 'c' || genbuf[0] == 'C') ) {
+ else if ((fhdr->filemode & FILE_VOTE) && genbuf[0] == 'c') {
sprintf(genbuf, "%u", (unsigned int)(fhdr->multi.vote_limits.logins) * 10);
do {
getdata_buf(23, 0, "上站次數下限 (0~2550):", genbuf, 5, LCECHO);