diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-13 11:20:04 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-13 11:20:04 +0800 |
commit | 6a428fb60d8ec6092d428b2e0f869a31f4890dc7 (patch) | |
tree | a0671ea2dc0168a9cb5625f867d553f6d0441efc /mbbsd/register.c | |
parent | 438c456b95eec0e5ac662ca3cf2386dff2c44bc7 (diff) | |
download | pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.gz pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.bz2 pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.lz pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.xz pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.zst pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.zip |
replace time(NULL) by now
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@163 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/register.c')
-rw-r--r-- | mbbsd/register.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c index 53acc82f..36b30f46 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -1,4 +1,4 @@ -/* $Id: register.c,v 1.3 2002/04/28 19:35:29 in2 Exp $ */ +/* $Id: register.c,v 1.4 2002/05/13 03:20:04 ptt Exp $ */ #define _XOPEN_SOURCE #include <stdio.h> @@ -21,7 +21,7 @@ extern char *str_new; extern char *msg_uid; extern int t_lines, t_columns; /* Screen size / width */ extern char *str_mail_address; - +extern time_t now; /* password encryption */ static char pwbuf[14]; @@ -111,7 +111,6 @@ static int compute_user_value(userec_t *urec, time_t clock) { int check_and_expire_account(int uid,userec_t *urec) { userec_t zerorec; - time_t now=time(NULL); char genbuf[200],genbuf2[200]; int val; if((val = compute_user_value(urec, now)) < 0) { @@ -153,7 +152,7 @@ int getnewuserid() { int fd, i; memset(&zerorec, 0, sizeof(zerorec)); - clock = time(NULL); + clock = now; /* Lazy method : 先找尋已經清除的過期帳號 */ if((i = searchnewuser(0)) == 0) { @@ -265,7 +264,7 @@ void new_register() { } newuser.userlevel = PERM_DEFAULT; newuser.uflag = COLOR_FLAG | BRDSORT_FLAG | MOVIE_FLAG; - newuser.firstlogin = newuser.lastlogin = time(NULL); + newuser.firstlogin = newuser.lastlogin = now; newuser.money = 0; newuser.pager = 1; allocid = getnewuserid(); |