diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-10-27 00:42:14 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-10-27 00:42:14 +0800 |
commit | d839e1ec58637953063cc89b73cc0ceab8b3880d (patch) | |
tree | 56591bada4b1139673926699a309f6517fefbeed /mbbsd/mbbsd.c | |
parent | 5417ac4001f50bf42edec20af139537db4e5311a (diff) | |
download | pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.tar pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.tar.gz pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.tar.bz2 pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.tar.lz pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.tar.xz pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.tar.zst pttbbs-d839e1ec58637953063cc89b73cc0ceab8b3880d.zip |
BRD_OVER18 patch. see http://www.ticrf.org.tw for details
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3231 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r-- | mbbsd/mbbsd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 38716ad0..9cd20572 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1005,6 +1005,13 @@ user_login(void) /* 初始化: random number 增加user跟時間的差異 */ mysrand(); + /* check if over18 */ + if( (ptime.tm_year - cuser.year) >= 18 || + (ptime.tm_year - cuser.year == 17 && + ((ptime.tm_mon+1) > cuser.month || + ((ptime.tm_mon+1) == cuser.month && ptime.tm_mday > cuser.day))) ) + over18 = 1; + /* show welcome_login */ if( (ifbirth = (ptime.tm_mday == cuser.day && ptime.tm_mon + 1 == cuser.month)) ){ |