diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-02-19 11:18:16 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-02-19 11:18:16 +0800 |
commit | b01d64ad9977db6acc9ce8aa5c58ea566a21342f (patch) | |
tree | 2003569d751dd1209d7fdb956795bfc2223e0360 /mbbsd/user.c | |
parent | c4dbb6fbedec8ff557466e0bc31e13dfbdec96a2 (diff) | |
download | pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.tar pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.tar.gz pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.tar.bz2 pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.tar.lz pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.tar.xz pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.tar.zst pttbbs-b01d64ad9977db6acc9ce8aa5c58ea566a21342f.zip |
user: improve regcode prompt/check
cache: support for dynamic aggressive topic handler
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3928 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r-- | mbbsd/user.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c index df0c948e..45b162d7 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -15,6 +15,8 @@ static const char * const chess_type[3] = { }; #endif +#define REGCODE_INITIAL "v6" // always 2 characters + int kill_user(int num, const char *userid) { @@ -538,8 +540,8 @@ makeregcode(char *buf) /* generate a new regcode */ buf[13] = 0; - buf[0] = 'v'; - buf[1] = '6'; + buf[0] = REGCODE_INITIAL[0]; + buf[1] = REGCODE_INITIAL[1]; for( i = 2 ; i < 13 ; ++i ) buf[i] = alphabet[random() % 52]; @@ -1776,9 +1778,9 @@ u_register(void) clear(); stand_title("EMail認證"); move(2, 0); - prints("%s(%s) 您好,請輸入您的認證碼。\n" - "或您可以輸入 x 來重新填寫 E-Mail 或改由站長手動認證\n", - cuser.userid, cuser.nickname); + + prints("請輸入您的認證碼。(由 %s 開頭無空白的十三碼)\n" + "或輸入 x 來重新填寫 E-Mail 或改由站長手動認證\n", REGCODE_INITIAL); inregcode[0] = 0; do{ @@ -1788,9 +1790,9 @@ u_register(void) break; if( strlen(inregcode) != 13 || inregcode[0] == ' ') vmsg("認證碼輸入不完整,總共應有十三碼,沒有空白字元。"); - else if( inregcode[0] != 'v' || inregcode[1] != '6' ) { + else if( inregcode[0] != REGCODE_INITIAL[0] || inregcode[1] != REGCODE_INITIAL[1] ) { /* old regcode */ - vmsg("輸入的認證碼錯誤或因系統昇級已失效," + vmsg("輸入的認證碼錯誤," // "或因系統昇級已失效," "請輸入 x 重填一次 E-Mail"); } else |