diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-10 00:58:32 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-10 00:58:32 +0800 |
commit | 4333028f2ee2837e2b95224a24c22a425a881871 (patch) | |
tree | 0ff990eb30075f13e1ea56c843d29539b4132f66 /daemon/logind | |
parent | 1b6745ea141d4ae88bed9dc17eb179c27607bf10 (diff) | |
download | pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.tar pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.tar.gz pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.tar.bz2 pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.tar.lz pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.tar.xz pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.tar.zst pttbbs-4333028f2ee2837e2b95224a24c22a425a881871.zip |
* fix: some messages (eg, max guest alert) has reverse attribute in login daemon
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4533 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'daemon/logind')
-rw-r--r-- | daemon/logind/logind.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c index 934e8046..161410f6 100644 --- a/daemon/logind/logind.c +++ b/daemon/logind/logind.c @@ -341,6 +341,7 @@ _set_bind_opt(int sock) #define BOTTOM_YX "24;1" #define LOGIN_PROMPT_MSG ANSI_RESET "請輸入代號" MSG_GUEST MSG_REGNEW ": " ANSI_REVERSE #define LOGIN_PROMPT_YX "21;1" +#define LOGIN_PROMPT_END ANSI_RESET #define PASSWD_PROMPT_MSG ANSI_RESET MSG_PASSWD #define PASSWD_PROMPT_YX "22;1" #define PASSWD_CHECK_MSG ANSI_RESET "正在檢查帳號與密碼..." @@ -512,6 +513,12 @@ draw_userid_prompt(login_conn_ctx *conn) } static void +draw_userid_prompt_end(login_conn_ctx *conn) +{ + _buff_write(conn, LOGIN_PROMPT_END, sizeof(LOGIN_PROMPT_END)-1); +} + +static void draw_passwd_prompt(login_conn_ctx *conn) { _mt_move_yx(conn, PASSWD_PROMPT_YX); _mt_clrtoeol(conn); @@ -875,6 +882,9 @@ client_cb(int fd, short event, void *arg) break; case LOGIN_HANDLE_PROMPT_PASSWD: + // because prompt would reverse attribute, reset here. + draw_userid_prompt_end(conn); + #ifdef DETECT_CLIENT // stop detection conn->telnet.cc_arg = NULL; |