summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 15:58:43 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 15:58:43 +0800
commita94b472a72351631253be327d73738cc4d0dd00d (patch)
tree51aa0170f6ba89561451469efb067290191920e3 /mbbsd/bbs.c
parent1d8009f548a41b171b7c9ef562ce043f7103b671 (diff)
downloadpttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.gz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.bz2
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.lz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.xz
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.tar.zst
pttbbs-a94b472a72351631253be327d73738cc4d0dd00d.zip
General Update by PttSuggest:
- 'w' in mail can msg - author in mail header will highlight if online - recommendation message fix - ignore empty input for login - better prompt for empty fav git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3599 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 38cabddd..51f45a54 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -302,7 +302,6 @@ readdoent(int num, fileheader_t * ent)
int type;
char *mark, *title,
color, special = 0, isonline = 0, recom[8];
- userinfo_t *uentp;
type = brc_unread(currbid, ent->filename) ? '+' : ' ';
if ((currmode & MODE_BOARD) && (ent->filemode & FILE_DIGEST))
type = (type == ' ') ? '*' : '#';
@@ -349,16 +348,9 @@ readdoent(int num, fileheader_t * ent)
if (!strncmp(title, "[公告]", 6))
special = 1;
-#if 1
- if (!strchr(ent->owner, '.') && !SHM->GV2.e.noonlineuser &&
- (uentp = search_ulist_userid(ent->owner)) && isvisible(currutmp, uentp))
- isonline = 1;
-#else
- if (!strchr(ent->owner, '.') && (uid = searchuser(ent->owner, NULL)) &&
- !SHM->GV2.e.noonlineuser &&
- (uentp = search_ulist(uid)) && isvisible(currutmp, uentp))
- isonline = 1;
-#endif
+
+ isonline = query_online(ent->owner);
+
if(ent->recommend>99)
strcpy(recom,"1m爆");
else if(ent->recommend>9)
@@ -1147,7 +1139,7 @@ invalid_brdname(const char *brd)
return rv;
}
-static int
+int
b_call_in(int ent, const fileheader_t * fhdr, const char *direct)
{
userinfo_t *u = search_ulist(searchuser(fhdr->owner, NULL));
@@ -2318,6 +2310,7 @@ recommend(int ent, fileheader_t * fhdr, const char *direct)
}
#ifndef DEBUG
+ // 下面這什麼鬼,麻煩好心人把它拆出去
if ( !((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP)) &&
(cuser.firstlogin > (now - (time4_t)bcache[currbid - 1].post_limit_regtime * 2592000) ||
cuser.badpost > (255 - (unsigned int)(bcache[currbid - 1].post_limit_badpost)) ||
@@ -2387,12 +2380,13 @@ recommend(int ent, fileheader_t * fhdr, const char *direct)
move(b_lines, 0); clrtoeol();
- if (fhdr->recommend == 0 && strcmp(cuser.userid, fhdr->owner) == 0)
+ if (strcmp(cuser.userid, fhdr->owner) == 0)
{
- // owner recomment first time
+ // owner recomment
+ // no matter it is first time or not.
type = 2;
move(b_lines-1, 0); clrtoeol();
- outs("本人推薦第一次, 使用 → 加註方式\n");
+ outs("作者本人, 使用 → 加註方式\n");
}
#ifndef DEBUG
else if (!(currmode & MODE_BOARD) &&
@@ -2407,7 +2401,7 @@ recommend(int ent, fileheader_t * fhdr, const char *direct)
// too close
type = 2;
move(b_lines-1, 0); clrtoeol();
- outs("推薦時間太近, 使用 → 加註方式\n");
+ outs("時間太近, 使用 → 加註方式\n");
}
#endif