From 13688af3996212fc902503787999a79439fd8b9b Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 5 Jan 2008 08:46:17 +0000 Subject: - bbslua: fixed compilation error if not using BBS-Lua - bbslua: fix key names - sample conf: add description for guest dbcs intresc option git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3793 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbslua.c | 4 ++-- mbbsd/more.c | 2 ++ sample/pttbbs.conf | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c index b7736c65..4059791a 100644 --- a/mbbsd/bbslua.c +++ b/mbbsd/bbslua.c @@ -120,7 +120,7 @@ bl_k2s(lua_State* L, int v) lua_pushstring(L, "TAB"); else if (v == '\b' || v == 0x7F) lua_pushstring(L, "BS"); - else if (v == '\n') + else if (v == '\n' || v == '\r' || v == Ctrl('M')) lua_pushstring(L, "ENTER"); else if (v < ' ') lua_pushfstring(L, "^%c", v-1+'A'); @@ -294,10 +294,10 @@ static void bbsluaRegConst(lua_State *L, const char *globName) { lua_getglobal(L, globName); - lua_pushstring(L, "ESC"); lua_pushstring(L, ESC_STR); lua_settable(L, -3); + lua_getglobal(L, globName); lua_pushstring(L, "ANSI_RESET"); lua_pushstring(L, ANSI_RESET); lua_settable(L, -3); diff --git a/mbbsd/more.c b/mbbsd/more.c index 2d4fec8d..6c5c1428 100644 --- a/mbbsd/more.c +++ b/mbbsd/more.c @@ -32,10 +32,12 @@ int more(char *fpath, int promptend) ChessReplayGame(fpath); break; +#if defined(USE_BBSLUA) case RET_DOBBSLUA: r = FULLUPDATE; bbslua(fpath); break; +#endif } return r; diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf index 97554aa0..917c35bc 100644 --- a/sample/pttbbs.conf +++ b/sample/pttbbs.conf @@ -182,12 +182,16 @@ /* 若定義, 在使用者註冊之前, 會先顯示出該檔案, 經使用者確認後才能註冊 */ //#define HAVE_USERAGREEMENT "etc/UserAgreement" +/* DBCS 相關設定 */ /* DBCS Aware: 讓游標不會跑到 DBCS trailing bytes 上 */ //#define DBCSAWARE /* 因為 DBCS 要先偵測,所以可以利用指定下面的時間來判斷使用者有否偵測過 * 請換成你真正上線的時間 (time_t) */ //#define DBCSAWARE_UPGRADE_STARTTIME (0) +/* 若定義,guest 帳號預設不顯示一字雙色 */ +// #define GUEST_DEFAULT_DBCS_NOINTRESC + /* "不"使用新式的 pmore (piaip's more) 代替舊式 bug 抓不完的 more */ //#define USE_TRADITIONAL_MORE -- cgit v1.2.3