summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index e99fa7e5..2bfb225b 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -498,8 +498,9 @@ inline static void mkuserdir(char *userid)
static void
login_query()
{
- char uid[IDLEN + 1], passbuf[PASSLEN];
- int attempts;
+ /* uid 加一位, for gb login */
+ char uid[IDLEN + 2], passbuf[PASSLEN];
+ int attempts, len;
resolve_garbage();
now = time(0);
@@ -526,6 +527,16 @@ login_query()
#endif
getdata(20, 0, "請輸入代號,或以[guest]參觀,以[new]註冊:",
uid, sizeof(uid), DOECHO);
+
+ /* switch to gb mode if uid end with '.' */
+ len = strlen(uid);
+ if (uid[0] && uid[len - 1] == '.') {
+ set_converting_type(1);
+ uid[len - 1] = 0;
+ }
+ else if (len == IDLEN + 1)
+ uid[len - 1] = 0;
+
if (strcasecmp(uid, str_new) == 0) {
#ifdef LOGINASNEW
new_register();
@@ -995,6 +1006,7 @@ start_client()
do_term_init();
signal(SIGALRM, abort_bbs);
alarm(600);
+
login_query(); /* Ptt 加上login time out */
m_init(); /* init the user mail path */
user_login();