summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-02-26 00:51:07 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-02-26 00:51:07 +0800
commit3217095b1f68b1beb329d89a31d7bf11e75b1c1d (patch)
treeb9eab953128fd211a908e64d4e9726f00459b4b1
parent31077a7c833e60121e843456d52fbbb5bda88ddb (diff)
downloadpttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.tar
pttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.tar.gz
pttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.tar.bz2
pttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.tar.lz
pttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.tar.xz
pttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.tar.zst
pttbbs-3217095b1f68b1beb329d89a31d7bf11e75b1c1d.zip
- b_config: prompt fine-tune, reducing unnecessary messages
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3949 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/board.c70
1 files changed, 42 insertions, 28 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index c87a968d..f8f9952c 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -407,35 +407,48 @@ b_config(void)
#define POSTRESTRICTION(msg,utag) \
prints(msg, attr ? ANSI_COLOR(1) : "", i, attr ? ANSI_RESET : "")
- move_ansi(ipostres++, COLPOSTRES);
- i = (int)bp->post_limit_logins * 10;
- attr = (cuser.numlogins < i) ? 1 : 0;
- if (attr) outs(ANSI_COLOR(31));
- prints("Ω计 %d Ω", i);
- if (attr) outs(ANSI_RESET);
-
- move_ansi(ipostres++, COLPOSTRES);
- i = (int)bp->post_limit_posts * 10;
- attr = (cuser.numposts < i) ? 1 : 0;
- if (attr) outs(ANSI_COLOR(31));
- prints("ゅ彻絞计 %d 絞", i);
- if (attr) outs(ANSI_RESET);
-
- move_ansi(ipostres++, COLPOSTRES);
- i = bp->post_limit_regtime;
- attr = (cuser.firstlogin >
- (now - (time4_t)bp->post_limit_regtime * 2592000)) ? 1 : 0;
- if (attr) outs(ANSI_COLOR(31));
- prints("爹丁 %d る",i);
- if (attr) outs(ANSI_RESET);
-
- move_ansi(ipostres++, COLPOSTRES);
- i = 255 - bp->post_limit_badpost;
- attr = (cuser.badpost > i) ? 1 : 0;
- if (attr) outs(ANSI_COLOR(31));
- prints("ゅ絞计 %d 絞", i);
- if (attr) outs(ANSI_RESET);
+ if (bp->post_limit_logins)
+ {
+ move_ansi(ipostres++, COLPOSTRES);
+ i = (int)bp->post_limit_logins * 10;
+ attr = (cuser.numlogins < i) ? 1 : 0;
+ if (attr) outs(ANSI_COLOR(31));
+ prints("Ω计 %d Ω", i);
+ if (attr) outs(ANSI_RESET);
+ }
+
+ if (bp->post_limit_posts)
+ {
+ move_ansi(ipostres++, COLPOSTRES);
+ i = (int)bp->post_limit_posts * 10;
+ attr = (cuser.numposts < i) ? 1 : 0;
+ if (attr) outs(ANSI_COLOR(31));
+ prints("ゅ彻絞计 %d 絞", i);
+ if (attr) outs(ANSI_RESET);
+ }
+
+ if (bp->post_limit_regtime)
+ {
+ move_ansi(ipostres++, COLPOSTRES);
+ i = bp->post_limit_regtime;
+ attr = (cuser.firstlogin >
+ (now - (time4_t)bp->post_limit_regtime * 2592000)) ? 1 : 0;
+ if (attr) outs(ANSI_COLOR(31));
+ prints("爹丁 %d る",i);
+ if (attr) outs(ANSI_RESET);
+ }
+
+ // if (bp->post_limit_badpost)
+ {
+ move_ansi(ipostres++, COLPOSTRES);
+ i = 255 - bp->post_limit_badpost;
+ attr = (cuser.badpost > i) ? 1 : 0;
+ if (attr) outs(ANSI_COLOR(31));
+ prints("ゅ絞计 %d 絞", i);
+ if (attr) outs(ANSI_RESET);
+ }
+ if (!CheckPostPerm())
{
const char *msg = postperm_msg(bp->brdname);
if (msg) // some reasons
@@ -447,6 +460,7 @@ b_config(void)
}
}
+ // show BM commands
{
const char *aCat = ANSI_COLOR(1;32);
const char *aHot = ANSI_COLOR(1;36);