summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-08 23:35:15 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-08 23:35:15 +0800
commita56697a4d2dd0507a20c5184d41349a1b07df31c (patch)
treec36ad63618aa1b2922a36389c05ab829c382ba6e
parente58443057c072b3b45627e8ec62b963daa32160f (diff)
downloadpttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.tar
pttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.tar.gz
pttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.tar.bz2
pttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.tar.lz
pttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.tar.xz
pttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.tar.zst
pttbbs-a56697a4d2dd0507a20c5184d41349a1b07df31c.zip
1. let is unable to use gamble command if the board is under violation.
2. unable to open ticket while the CPU loading is high. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3012 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 234b5444..0bd52e5e 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1564,6 +1564,12 @@ hold_gamble(int ent, const fileheader_t * fhdr, const char *direct)
if (!(currmode & MODE_BOARD))
return 0;
+ if (bp->brdattr & BRD_BAD )
+ {
+ vmsg("¹Hªk¬Ý¬ÝݪO¸T¤îî¨ÏÏ¥Îνää½L");
+ return 0;
+ }
+
setbfile(fn_ticket, currboard, FN_TICKET);
setbfile(fn_ticket_end, currboard, FN_TICKET_END);
setbfile(genbuf, currboard, FN_TICKET_LOCK);
@@ -1585,6 +1591,11 @@ hold_gamble(int ent, const fileheader_t * fhdr, const char *direct)
"¬O§_­n¶}¼ú [§_/¬O]?(N/y)¡G", yn, 3, LCECHO);
if (yn[0] != 'y')
return FULLUPDATE;
+ if(cpuload(NULL) > MAX_CPULOAD/4)
+ {
+ vmsg("­t²üü¹L°ªª ½ÐЩóó¨t²Îέt²üü§C®Éɶ}¼ú..");
+ return FULLUPDATE;
+ }
openticket(currbid);
return FULLUPDATE;
} else if (dashf(genbuf)) {