diff options
-rw-r--r-- | pttbbs/include/config.h | 3 | ||||
-rw-r--r-- | pttbbs/mbbsd/cal.c | 5 | ||||
-rw-r--r-- | pttbbs/mbbsd/gamble.c | 10 | ||||
-rw-r--r-- | pttbbs/mbbsd/ordersong.c | 6 |
4 files changed, 24 insertions, 0 deletions
diff --git a/pttbbs/include/config.h b/pttbbs/include/config.h index 01ff5b8a..64112b3f 100644 --- a/pttbbs/include/config.h +++ b/pttbbs/include/config.h @@ -455,6 +455,9 @@ #ifndef LOG_CONF_MASS_DELETE // 記錄大量刪除檔案 #define LOG_CONF_MASS_DELETE (0) #endif +#ifndef LOG_CONF_OSONG_VERBOSE // 詳細點播記錄 +#define LOG_CONF_OSONG_VERBOSE (0) +#endif ///////////////////////////////////////////////////////////////////////////// // Default Configurations 預設參數 diff --git a/pttbbs/mbbsd/cal.c b/pttbbs/mbbsd/cal.c index 6be82c4c..7076c743 100644 --- a/pttbbs/mbbsd/cal.c +++ b/pttbbs/mbbsd/cal.c @@ -572,7 +572,12 @@ p_sysinfo(void) #endif load = cpuload(NULL); +#ifdef USE_FANCY_LOAD + // You have to define your own fancy_load function. + cpuloadstr = fancy_load(load); +#else cpuloadstr = (load < 5 ? "良好" : (load < 20 ? "尚可" : "過重")); +#endif clear(); showtitle("系統資訊", BBSNAME); diff --git a/pttbbs/mbbsd/gamble.c b/pttbbs/mbbsd/gamble.c index 21e2b062..b86b3cbf 100644 --- a/pttbbs/mbbsd/gamble.c +++ b/pttbbs/mbbsd/gamble.c @@ -6,6 +6,10 @@ #define MAX_SUBJECT_LEN 650 //8*81 = 648 最大 主題長度 #define NARROW_ITEM_WIDTH 8 // old (narrow) item width +#ifndef GAMBLE_ACTION_DELAY_US +#define GAMBLE_ACTION_DELAY_US (0) // 每個動作之前的 delay +#endif + // Use "%lld" format string whenever you access variables in bignum_t. typedef long long bignum_t; @@ -200,6 +204,10 @@ ticket(int bid) char betname[MAX_ITEM][MAX_ITEM_LEN]; boardheader_t *bh = NULL; + // No scripting. + vkey_purge(); + usleep(2.5 * GAMBLE_ACTION_DELAY_US); // delay longer + STATINC(STAT_GAMBLE); if (bid) { bh = getbcache(bid); @@ -217,6 +225,7 @@ ticket(int bid) break; } move(20, 0); + vkey_purge(); reload_money(); prints("現有 " MONEYNAME ": " ANSI_COLOR(1;31) "%d" ANSI_RESET "\n" "請選擇要購買的種類(1~%d)[Q:離開]" ANSI_RESET ":", @@ -247,6 +256,7 @@ ticket(int bid) if (append_ticket_record(path, ch, n, count) < 0) goto doesnt_catch_up; } + usleep(GAMBLE_ACTION_DELAY_US); } unlockutmpmode(); return 0; diff --git a/pttbbs/mbbsd/ordersong.c b/pttbbs/mbbsd/ordersong.c index b3ce36f2..58ffde41 100644 --- a/pttbbs/mbbsd/ordersong.c +++ b/pttbbs/mbbsd/ordersong.c @@ -182,6 +182,12 @@ do_order_song(void) "id: %-12s ◇ %s 留言給 %s : \"%s\", 轉寄至 %s\n", cuser.userid, sender, receiver, say, address); + LOG_IF(LOG_CONF_OSONG_VERBOSE, + log_filef("log/osong_verbose.log", LOG_CREAT, + "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", + Cdate(&now), cuser.userid, trans_buffer, address, + sender, receiver, say)); + if (append_record(OSONGPATH "/" FN_DIR, &mail, sizeof(mail)) != -1) { pwcuSetLastSongTime(now); /* Jaky 超過 MAX_ADBANNER 首歌就開始砍 */ |