summaryrefslogtreecommitdiffstats
path: root/pttbbs
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
commit0fd11efda8c299b511664ca8044a1710ec02ea9c (patch)
treed64df46b75a32f6983d8e2356a3ed9320cd2a0a9 /pttbbs
parentf451dab9a3b073631fef5894f780df5c292a3e52 (diff)
downloadpttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.tar
pttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.tar.gz
pttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.tar.bz2
pttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.tar.lz
pttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.tar.xz
pttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.tar.zst
pttbbs-0fd11efda8c299b511664ca8044a1710ec02ea9c.zip
remove field "recommend" from userec_t
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@645 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'pttbbs')
-rw-r--r--pttbbs/include/pttstruct.h5
-rw-r--r--pttbbs/mbbsd/bbs.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/pttbbs/include/pttstruct.h b/pttbbs/include/pttstruct.h
index 29984823..12054171 100644
--- a/pttbbs/include/pttstruct.h
+++ b/pttbbs/include/pttstruct.h
@@ -1,4 +1,4 @@
-/* $Id: pttstruct.h,v 1.27 2002/11/16 13:41:06 kcwu Exp $ */
+/* $Id: pttstruct.h,v 1.28 2003/01/24 14:41:19 in2 Exp $ */
#ifndef INCLUDE_STRUCT_H
#define INCLUDE_STRUCT_H
@@ -75,8 +75,7 @@ typedef struct userec_t {
char mind[4];
char ident[11];
unsigned int uflag2;
- time_t recommend;
- char pad[68];
+ char pad[72];
} userec_t;
/* these are flags in userec_t.uflag */
#define SIG_FLAG 0x3 /* signature number, 2 bits */
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index 2ee8423d..0622e720 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/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);