summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-24 22:41:19 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-24 22:41:19 +0800
commit22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05 (patch)
treebc6cbf657abf0bf767806ec09aefff11fe95a2ff /mbbsd
parent4885e20bea293dc7c318a15c79787ab54bb630e1 (diff)
downloadpttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.tar
pttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.tar.gz
pttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.tar.bz2
pttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.tar.lz
pttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.tar.xz
pttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.tar.zst
pttbbs-22fd324e2bd55d539e9b8ec1efd80e9a7d95ba05.zip
remove field "recommend" from userec_t
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@645 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 2ee8423d..0622e720 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1,4 +1,4 @@
-/* $Id: bbs.c,v 1.76 2002/11/08 17:49:03 in2 Exp $ */
+/* $Id: bbs.c,v 1.77 2003/01/24 14:41:19 in2 Exp $ */
#include "bbs.h"
static void
@@ -1209,6 +1209,7 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
struct tm *ptime = localtime(&now);
char buf[200], path[200], yn[5];
boardheader_t *bp;
+ static time_t lastrecommend = 0;
if( currmode & MODE_SELECT )
return DONOTHING;
@@ -1234,7 +1235,7 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
}
#ifndef DEBUG
if (!(currmode & MODE_BOARD) && getuser(cuser.userid) &&
- now - xuser.recommend < 40) {
+ now - lastrecommend < 40) {
move(b_lines - 1, 0);
prints("離上次推薦時間太近囉, 請多花點時間仔細閱\讀文章!");
pressanykey();
@@ -1260,7 +1261,7 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
lock_substitute_record(direct, fhdr, sizeof(*fhdr), ent, LOCK_UN);
else{
fhdr->recommend++;
- cuser.recommend = now;
+ lastrecommend = now;
passwd_update(usernum, &cuser);
lock_substitute_record(direct, fhdr, sizeof(*fhdr), ent, LOCK_UN);
substitute_check(fhdr);