diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-02 23:42:28 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-03-02 23:42:28 +0800 |
commit | 4b23515004b96426b06646ca37b6475c0eaf37e5 (patch) | |
tree | 11cc980288f2b4efb6eb93800da46a0b371b326b /mbbsd | |
parent | 11dd289ca94895698659e94a462457c75733331b (diff) | |
download | pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.tar pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.tar.gz pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.tar.bz2 pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.tar.lz pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.tar.xz pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.tar.zst pttbbs-4b23515004b96426b06646ca37b6475c0eaf37e5.zip |
let no PERM_LOGIN user read the mail before fill the register form.
dont check length of nick, address, blahblah every time.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1576 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/mbbsd.c | 6 | ||||
-rw-r--r-- | mbbsd/register.c | 17 |
2 files changed, 16 insertions, 7 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 472d8566..9e135c76 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -845,7 +845,7 @@ inline static void record_lasthost(char *fromhost, int len){ cuser.lasthost[len - 1] = '\0'; } -inline static void check_mailbox_and_read(void){ +inline static void check_mailbox_quota(void){ if (chkmailbox()) m_read(); } @@ -968,7 +968,7 @@ user_login() birthday_make_a_wish(ptime, tmp); check_bad_login(); - check_mailbox_and_read(); + check_mailbox_quota(); check_register(); record_lasthost(fromhost, 16); restore_backup(); @@ -977,7 +977,7 @@ user_login() pressanykey(); } else { pressanykey(); - check_mailbox_and_read(); + check_mailbox_quota(); } if (!PERM_HIDE(currutmp)) diff --git a/mbbsd/register.c b/mbbsd/register.c index ca49400c..58694c3d 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -300,6 +300,16 @@ check_register() { char *ptr = NULL; + if (HAS_PERM(PERM_LOGINOK)) + return; + + /* + * 避免使用者被退回註冊單後,在知道退回的原因之前, + * 又送出一次註冊單。 + */ + if (currutmp->mailalert) + m_read(); + stand_title("請詳細填寫個人資料"); while (strlen(cuser.username) < 2) @@ -331,19 +341,18 @@ check_register() * cuser.userid, str_mail_address); } while(!strchr(cuser.email, '@')); * * } */ - if (!HAS_PERM(PERM_SYSOP) && !HAS_PERM(PERM_LOGINOK)) { + if (!HAS_PERM(PERM_SYSOP)) { /* 回覆過身份認證信函,或曾經 E-mail post 過 */ clear(); move(9, 3); prints("請詳填寫\033[32m註冊申請單\033[m," "通告站長以獲得進階使用權力。\n\n\n\n"); u_register(); - } + #ifdef NEWUSER_LIMIT - if (!(cuser.userlevel & PERM_LOGINOK) && !HAS_PERM(PERM_SYSOP)) { if (cuser.lastlogin - cuser.firstlogin < 3 * 86400) cuser.userlevel &= ~PERM_POST; more("etc/newuser", YEA); - } #endif + } } |