From 52d8247678ea9b8242a3d9264a937bc3d3d76405 Mon Sep 17 00:00:00 2001 From: in2 Date: Fri, 8 Nov 2002 17:45:43 +0000 Subject: =?UTF-8?q?=EF=BF=BD=EF=BF=BD=EF=BF=BD@=EF=BF=BD=EF=BF=BD=EF=BF=BD?= =?UTF-8?q?=EF=BF=BD=EF=BF=BDi=EF=BF=BDH=EF=BF=BD=EF=BF=BD=EF=BF=BD?= =?UTF-8?q?=EF=BF=BD,=2040=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD?= =?UTF-8?q?=EF=BF=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@563 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 9e905b90..e8fa0075 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1,4 +1,4 @@ -/* $Id: bbs.c,v 1.74 2002/11/07 13:59:35 in2 Exp $ */ +/* $Id: bbs.c,v 1.75 2002/11/08 17:45:43 in2 Exp $ */ #include "bbs.h" static void @@ -1202,6 +1202,7 @@ recommend_cancel(int ent, fileheader_t * fhdr, char *direct) touchdircache(currbid); return FULLUPDATE; } + static int recommend(int ent, fileheader_t * fhdr, char *direct) { @@ -1227,20 +1228,23 @@ recommend(int ent, fileheader_t * fhdr, char *direct) /* 暫時性的 code 原來舊有值取消 */ fhdr->recommend = 0; -#if 0 + if (fhdr->recommend < 0 && strcmp(cuser.userid, fhdr->owner) == 0){ + vmsg("警告! 本人不能推薦第一次!"); + return FULLUPDATE; + } #ifndef DEBUG if (!(currmode & MODE_BOARD) && getuser(cuser.userid) && - now - xuser.recommend < 60) { + now - xuser.recommend < 40) { move(b_lines - 1, 0); prints("離上次推薦時間太近囉, 請多花點時間仔細閱\讀文章!"); pressanykey(); return FULLUPDATE; } -#endif #endif if (!getdata(b_lines - 2, 0, "推薦語:", path, 40, DOECHO) || - !getdata(b_lines - 1, 0, "確定要推薦, 請仔細考慮(Y/N)?[n] ", yn, 5, LCECHO) + !getdata(b_lines - 1, 0, "確定要推薦, 請仔細考慮(Y/N)?[n] ", + yn, 5, LCECHO) || yn[0] != 'y') return FULLUPDATE; -- cgit v1.2.3