diff options
-rw-r--r-- | mbbsd/bbs.c | 14 | ||||
-rw-r--r-- | mbbsd/stuff.c | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 904d4638..39ba5a1f 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1,4 +1,4 @@ -/* $Id: bbs.c,v 1.57 2002/06/23 03:33:07 ptt Exp $ */ +/* $Id: bbs.c,v 1.58 2002/06/23 03:50:14 ptt Exp $ */ #include "bbs.h" static void mail_by_link(char* owner, char* title, char* path) { @@ -1035,7 +1035,7 @@ static int hold_gamble(int ent, fileheader_t *fhdr, char *direct) { i=atoi(yn); } while( i<10 || i>10000); fprintf(fp,"%d\n",i); - if(getdata(3,0,"設定自動封盤時間?(Y/n)",yn,6,LCECHO) && yn[0]!='n') + if(getdata(3,0,"設定自動封盤時間?(Y/n)",yn,3,LCECHO) && yn[0]!='n') { bp->endgamble= gettime(4, now); substitute_record(fn_board, bp, sizeof(boardheader_t), currbid); @@ -1510,11 +1510,11 @@ int b_note_edit_bname(int bid) { outs(msg_cancel); pressanykey(); } else { - aborted = (fh->bupdate - now ) / 86400 + 1; - sprintf(buf,"%d", aborted > 0 ? aborted : 0); - getdata_buf(3, 0, "請設定有效期限(0 - 9999)天?", buf, 5, DOECHO); - aborted = atoi(buf); - fh->bupdate = aborted ? now + aborted * 86400 : 0; + if(!getdata_buf(2, 0, "設定有效期限天?(n/Y)", buf, 3, LCECHO) + || buf[0]!='n') + fh->bupdate = gettime(3, fh->bupdate?fh->bupdate:now); + else + fh->bupdate = 0; substitute_record(fn_board, fh, sizeof(boardheader_t), bid); } return 0; diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index f11ff9d5..750158a2 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -1,4 +1,4 @@ -/* $Id: stuff.c,v 1.4 2002/06/23 03:33:07 ptt Exp $ */ +/* $Id: stuff.c,v 1.5 2002/06/23 03:50:14 ptt Exp $ */ #include "bbs.h" /* ----------------------------------------------------- */ @@ -287,7 +287,7 @@ time_t gettime(int line, time_t dt) }while((endtime.tm_mday = atoi(yn))<1 || endtime.tm_mday>31); sprintf(yn, "%d", ptime->tm_hour); do{ - getdata_buf(line, 22, "時(0-23):", yn, 3, LCECHO); + getdata_buf(line, 31, "時(0-23):", yn, 3, LCECHO); }while(( endtime.tm_hour = atoi(yn))<0 || endtime.tm_hour>23); return mktime(&endtime); } |