diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-02-18 15:45:46 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-02-18 15:45:46 +0800 |
commit | e159859b79ae37aeba10f1dc512285dcfe65f42a (patch) | |
tree | 9e5d2245f49b53472eb2f6ab35c279d9b4299c3f | |
parent | c2da76b2bb8dc6c3d065c2653614c609e388e84f (diff) | |
download | pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.tar pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.tar.gz pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.tar.bz2 pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.tar.lz pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.tar.xz pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.tar.zst pttbbs-e159859b79ae37aeba10f1dc512285dcfe65f42a.zip |
Prevent conditional mapping in hotkeys.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5930 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 18 | ||||
-rw-r--r-- | pttbbs/mbbsd/gamble.c | 11 |
2 files changed, 14 insertions, 15 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index 39a81601..6b3a8d0e 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -3943,11 +3943,11 @@ view_posthistory(int ent, const fileheader_t * fhdr, const char *direct) { #endif // USE_TIME_CAPSULE -#if defined(OUTJOBSPOOL) && defined(TARQUEUE_SENDURL) /* 看板備份 */ static int tar_addqueue(void) { +#if defined(OUTJOBSPOOL) && defined(TARQUEUE_SENDURL) char email[60], qfn[80], ans[2]; FILE *fp; char bakboard, bakman; @@ -4004,8 +4004,10 @@ tar_addqueue(void) outs("稍後將會在系統負荷較低的時候將資料寄給您~ :) "); pressanykey(); return FULLUPDATE; -} +#else + return DONOTHING; #endif +} /* ----------------------------------------------------- */ /* 看板進板畫面、文摘、精華區 */ @@ -4483,11 +4485,7 @@ const onekey_t read_comms[] = { { 0, NULL }, // Ctrl('D') { 1, manage_post }, // Ctrl('E') { 0, NULL }, // Ctrl('F') -#ifdef NO_GAMBLE - { 0, NULL }, // Ctrl('G') -#else { 0, hold_gamble }, // Ctrl('G') -#endif { 0, NULL }, // Ctrl('H') { 0, board_digest }, // Ctrl('I') KEY_TAB 9 { 0, NULL }, // Ctrl('J') @@ -4550,11 +4548,7 @@ const onekey_t read_comms[] = { { 1, cite_post }, // 'c' { 1, del_post }, // 'd' { 0, NULL }, // 'e' -#ifdef NO_GAMBLE - { 0, NULL }, // 'f' -#else { 0, join_gamble }, // 'f' -#endif { 1, good_post }, // 'g' { 0, b_help }, // 'h' { 0, b_config }, // 'i' @@ -4569,11 +4563,7 @@ const onekey_t read_comms[] = { { 1, read_post }, // 'r' { 0, do_select }, // 's' { 0, NULL }, // 't' -#if defined(OUTJOBSPOOL) && defined(TARQUEUE_SENDURL) { 0, tar_addqueue }, // 'u' -#else - { 0, NULL }, // 'u' -#endif { 1, b_mark_read_unread }, // 'v' { 1, b_call_in }, // 'w' { 0, NULL }, // 'x' diff --git a/pttbbs/mbbsd/gamble.c b/pttbbs/mbbsd/gamble.c index 4a8c7b22..b3e1f255 100644 --- a/pttbbs/mbbsd/gamble.c +++ b/pttbbs/mbbsd/gamble.c @@ -524,11 +524,16 @@ stop_gamble(void) } return 1; } +#endif int join_gamble(int eng GCC_UNUSED, const fileheader_t * fhdr GCC_UNUSED, const char *direct GCC_UNUSED) { +#ifdef NO_GAMBLE + return DONOTHING; +#else + if (!HasBasicUserPerm(PERM_LOGINOK)) return DONOTHING; if (stop_gamble()) { @@ -538,11 +543,15 @@ join_gamble(int eng GCC_UNUSED, const fileheader_t * fhdr GCC_UNUSED, assert(0<=currbid-1 && currbid-1<MAX_BOARD); ticket(currbid); return FULLUPDATE; +#endif } int hold_gamble(void) { +#ifdef NO_GAMBLE + return DONOTHING; +#else char fn_ticket[128], fn_ticket_end[128], genbuf[128], msg[256] = "", yn[10] = ""; char tmp[128]; @@ -660,8 +669,8 @@ hold_gamble(void) vmsg("樂透彩券設定完成"); return FULLUPDATE; -} #endif +} int ticket_main(void) |