summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-30 16:06:40 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-30 16:06:40 +0800
commit167a997af62b12fac966cf89d53bbe7ebaa27f81 (patch)
tree55def6e2aeedecf7cb7685d38d5906a77acd3fd1 /mbbsd
parent04b785848b45f4c40155bc9f1f67533fd56f7c0b (diff)
downloadpttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.tar
pttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.tar.gz
pttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.tar.bz2
pttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.tar.lz
pttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.tar.xz
pttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.tar.zst
pttbbs-167a997af62b12fac966cf89d53bbe7ebaa27f81.zip
- read: add 'search for "s"' in G search
- user: print reg date in userinfo. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4043 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/read.c24
-rw-r--r--mbbsd/user.c3
2 files changed, 22 insertions, 5 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 85347d9e..3de710aa 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -551,7 +551,7 @@ select_read(const keeploc_t * locmem, int sr_mode)
}
else {
// Ptt: only once for these modes.
- if(!first_select && _mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK))
+ if(!first_select && _mode & sr_mode & (RS_TITLE | RS_NEWPOST | RS_MARK | RS_SOLVED))
return DONOTHING;
if(sr_mode & RS_TITLE) {
@@ -608,7 +608,7 @@ select_read(const keeploc_t * locmem, int sr_mode)
}
/* mark and recommend shouldn't incremental select */
- if(sr_mode & (RS_MARK | RS_RECOMMEND))
+ if(sr_mode & (RS_MARK | RS_RECOMMEND | RS_SOLVED))
inc = 0;
if(reload) {
@@ -652,6 +652,9 @@ select_read(const keeploc_t * locmem, int sr_mode)
if( (sr_mode & RS_MARK) &&
!(fhs[i].filemode & FILE_MARKED) )
continue;
+ if( (sr_mode & RS_SOLVED) &&
+ !(fhs[i].filemode & FILE_SOLVED) )
+ continue;
else if((sr_mode & RS_NEWPOST) &&
!strncmp(fhs[i].title, "Re:", 3))
continue;
@@ -708,7 +711,6 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem,
{
int mode = DONOTHING, num, new_top=10;
int ch, new_ln = locmem->crs_ln, lastmode = DONOTHING;
- char direct[60];
static char default_ch = 0;
do {
@@ -894,7 +896,20 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem,
break;
case 'G':
- mode = select_read(locmem, RS_MARK);
+ // special types
+ switch(getans( currmode & MODE_SELECT ?
+ "增加條件 標記(m/s)[m]: ":
+ "搜尋標記(m/s)[m]: "))
+ {
+ case 's':
+ mode = select_read(locmem, RS_SOLVED);
+ break;
+
+ default:
+ case 'm':
+ mode = select_read(locmem, RS_MARK);
+ break;
+ }
break;
case '/':
@@ -1098,6 +1113,7 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem,
if(!rcmdlist[ch - 1].needitem)
mode = (*func)();
else if( num > 0 ){
+ char direct[60];
sprintf(direct,"%s.bottom", currdirect);
mode= (*func)(num, &headers[locmem->crs_ln-locmem->top_ln],
direct, locmem->crs_ln - locmem->top_ln);
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 4893d406..cbbcd96b 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -169,7 +169,8 @@ user_display(const userec_t * u, int adminmode)
prints(" 小 天 使: %s\n",
u->myangel[0] ? u->myangel : "無");
#endif
- prints(" 註冊日期: %s", ctime4(&u->firstlogin));
+ prints(" 註冊日期: %s (已滿%d天)",
+ ctime4(&u->firstlogin), (now-u->firstlogin)/86400);
prints(" 前次光臨: %s", ctime4(&u->lastlogin));
prints(" 上站文章: %d 次 / %d 篇\n",
u->numlogins, u->numposts);