summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);