diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-31 11:22:31 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-05-31 11:22:31 +0800 |
commit | 73452a673c51c9e363789abbfc3d0dec85581142 (patch) | |
tree | 9fad5a1a4f5bfe6264848836ecb55b210d7402cd /mbbsd/talk.c | |
parent | 44265c09a84cabfab57392d23a6f28bd70cf5cb4 (diff) | |
download | pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.gz pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.bz2 pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.lz pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.xz pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.tar.zst pttbbs-73452a673c51c9e363789abbfc3d0dec85581142.zip |
permission check when writing from article list
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@262 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r-- | mbbsd/talk.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c index e0cbefea..113f4c16 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1,4 +1,4 @@ -/* $Id: talk.c,v 1.50 2002/05/30 17:37:06 ptt Exp $ */ +/* $Id: talk.c,v 1.51 2002/05/31 03:22:31 in2 Exp $ */ #include <stdio.h> #include <string.h> #include <errno.h> @@ -1752,18 +1752,20 @@ static void draw_pickup(int drawall, pickup_t *pickup, int pickup_way, int call_in(userinfo_t *uentp, int fri_stat) { - char genbuf[60]; - if( HAS_PERM(PERM_LOGINOK) && - uentp->pid != currpid && - strcmp(uentp->userid, cuser.userid) != 0 && - (HAS_PERM(PERM_SYSOP) || - (uentp->pager != 3 && - (fri_stat & HFM || uentp->pager != 4))) ){ - sprintf(genbuf, "Call-In %s ĄG", uentp->userid); - my_write(uentp->pid, genbuf, uentp->userid, 0, NULL); - return 1; - } - return 0; + char genbuf[60]; + if( HAS_PERM(PERM_LOGINOK) && + uentp->pid != currpid && + strcmp(uentp->userid, cuser.userid) != 0 && + (HAS_PERM(PERM_SYSOP) || + (!uentp->invisible && + !(fri_stat & HRM) && + uentp->pager != 3 && + (fri_stat & HFM || uentp->pager != 4))) ){ + sprintf(genbuf, "Call-In %s ĄG", uentp->userid); + my_write(uentp->pid, genbuf, uentp->userid, 0, NULL); + return 1; + } + return 0; } static void userlist(void) { |