summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--include/pttstruct.h5
-rw-r--r--mbbsd/bbs.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h
index 29984823..12054171 100644
--- a/include/pttstruct.h
+++ b/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/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);