summaryrefslogtreecommitdiffstats
path: root/mbbsd/register.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-08 19:15:39 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-06-08 19:15:39 +0800
commit71f79c7083cc15749079d7241ca46f186f304012 (patch)
tree8052a10f3dbd5061172d12ee8698d65f70ae60a2 /mbbsd/register.c
parent524f96649436d3aa687c237a61c82cee5cf2e145 (diff)
downloadpttbbs-71f79c7083cc15749079d7241ca46f186f304012.tar
pttbbs-71f79c7083cc15749079d7241ca46f186f304012.tar.gz
pttbbs-71f79c7083cc15749079d7241ca46f186f304012.tar.bz2
pttbbs-71f79c7083cc15749079d7241ca46f186f304012.tar.lz
pttbbs-71f79c7083cc15749079d7241ca46f186f304012.tar.xz
pttbbs-71f79c7083cc15749079d7241ca46f186f304012.tar.zst
pttbbs-71f79c7083cc15749079d7241ca46f186f304012.zip
New DBCS aware: detecting and reversed default value
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2803 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/register.c')
-rw-r--r--mbbsd/register.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c
index d29466e0..b0d948d7 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -237,7 +237,7 @@ new_register(void)
vmsg("您嘗試錯誤的輸入太多,請下次再來吧");
exit(1);
}
- move(18, 0);
+ move(18, 0); clrtoeol();
outs(ANSI_COLOR(1;33) "為避免被偷看,您的密碼並不會顯示在畫面上,直接輸入完後按 Enter 鍵即可。" ANSI_RESET);
if ((getdata(19, 0, "請設定密碼:", passbuf,
sizeof(passbuf), NOECHO) < 3) ||
@@ -262,6 +262,14 @@ new_register(void)
newuser.firstlogin = newuser.lastlogin = now;
newuser.money = 0;
newuser.pager = 1;
+
+#ifdef DBCSAWARE
+ if(u_detectDBCSAwareEvilClient())
+ newuser.uflag &= ~DBCSAWARE_FLAG;
+ else
+ newuser.uflag |= DBCSAWARE_FLAG;
+#endif
+
allocid = getnewuserid();
if (allocid > MAX_USERS || allocid <= 0) {
fprintf(stderr, "本站人口已達飽和!\n");
@@ -330,3 +338,5 @@ check_register(void)
#endif
}
}
+/* vim:sw=4
+ */