summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-02 09:55:21 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-02 09:55:21 +0800
commit20a09fdf769533f7efc09990481e131f1e289874 (patch)
tree817f574143a5ad6382a8f216956f3c7e5bf7891e /mbbsd/bbs.c
parent1fcc5da29d40392d24c3dc5f9afd65290ab6ddbe (diff)
downloadpttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.gz
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.bz2
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.lz
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.xz
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.tar.zst
pttbbs-20a09fdf769533f7efc09990481e131f1e289874.zip
iswritable_stat, isvisible_stat
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@270 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 0191bada..9c5d864b 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1,4 +1,4 @@
-/* $Id: bbs.c,v 1.46 2002/06/01 00:40:28 ptt Exp $ */
+/* $Id: bbs.c,v 1.47 2002/06/02 01:55:21 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -15,6 +15,7 @@
#include "proto.h"
extern struct bcache_t *brdshm;
+extern userinfo_t *currutmp;
extern userec_t cuser;
extern void touchdircache(int bid);
extern int TagNum;
@@ -157,10 +158,11 @@ extern char currtitle[TTLEN + 1];
extern int Tagger();
-static void readdoent(int num, fileheader_t *ent) {
- int type,uid;
- char *mark, *title, color,
- special=0, isonline=0;
+static void readdoent(int num, fileheader_t *ent)
+{
+ int type,uid;
+ char *mark, *title, color, special=0, isonline=0;
+ userinfo_t *uentp;
if(ent->recommend>9 || ent->recommend <0 ) ent->recommend=0; //Ptt:¼È®É
type = brc_unread(ent->filename,brc_num,brc_list) ? '+' : ' ';
@@ -188,8 +190,7 @@ static void readdoent(int num, fileheader_t *ent) {
if(!strncmp(title,"[¤½§i]",6)) special=1;
if(!strchr(ent->owner, '.') && (uid=searchuser(ent->owner)) &&
- search_ulist(uid) &&
- isvisible_uid(uid))
+ (uentp = search_ulist(uid)) && isvisible(currutmp, uentp) )
isonline=1;
if(strncmp(currtitle, title, TTLEN))
@@ -679,20 +680,20 @@ int invalid_brdname(char *brd) {
return 1;
}
return 0;
-}
+}
+
static int b_call_in(int ent, fileheader_t *fhdr, char *direct)
{
- userinfo_t *u=search_ulist (searchuser(fhdr->owner));
- int fri_stat;
- if(u )
- {
- fri_stat= friend_stat(currutmp, u);
- if(isvisible_stat(currutmp, u, fri_stat) &&
- call_in(u, fri_stat))
- return FULLUPDATE;
- }
+ userinfo_t *u = search_ulist(searchuser(fhdr->owner));
+ if( u ){
+ int fri_stat;
+ fri_stat = friend_stat(currutmp, u);
+ if( isvisible_stat(currutmp, u, fri_stat) && call_in(u, fri_stat) )
+ return FULLUPDATE;
+ }
return DONOTHING;
}
+
static void do_reply(fileheader_t *fhdr) {
boardheader_t *bp;
bp = getbcache(currbid);