summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-16 11:18:25 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-16 11:18:25 +0800
commit99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf (patch)
tree7c428a12d3dd1621635ceaf115027fe50e2f35f2 /mbbsd/talk.c
parent50374a66e62e9b9471928726536efb86e316eb1d (diff)
downloadpttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.tar
pttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.tar.gz
pttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.tar.bz2
pttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.tar.lz
pttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.tar.xz
pttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.tar.zst
pttbbs-99b0a1a8c53a7eef4347c7d9be8c425abaa4efbf.zip
Check angel permission before starting conversation.
Adding MAP_PRIVATE flag when getting MAP_ANON from mmap(). (on Linux, without this flag causes EINVAL) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2197 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r--mbbsd/talk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 40d44668..39e142ae 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -3028,6 +3028,14 @@ AngelNotOnline(){
static void
TalkToAngel(){
userinfo_t* uent;
+ static int AngelPermChecked = 0;
+
+ if (cuser.myangel[0] && !AngelPermChecked) {
+ getuser(cuser.myangel);
+ if (!(xuser.userlevel & PERM_ANGEL))
+ cuser.myangel[0] = 0;
+ }
+ AngelPermChecked = 1;
if (cuser.myangel[0] == 0 && ! FindAngel()){
NoAngelFound("現在沒有小天使在線上");