summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-26 15:32:18 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-26 15:32:18 +0800
commit5435ec7642de4b788008940ccb0d638d32f31380 (patch)
tree0ac76c03439b12384d739b1a235c72a248198e0b /mbbsd/talk.c
parent5ea4a5e5fe9651d42fa9dce14e80e9877d150cf7 (diff)
downloadpttbbs-5435ec7642de4b788008940ccb0d638d32f31380.tar
pttbbs-5435ec7642de4b788008940ccb0d638d32f31380.tar.gz
pttbbs-5435ec7642de4b788008940ccb0d638d32f31380.tar.bz2
pttbbs-5435ec7642de4b788008940ccb0d638d32f31380.tar.lz
pttbbs-5435ec7642de4b788008940ccb0d638d32f31380.tar.xz
pttbbs-5435ec7642de4b788008940ccb0d638d32f31380.tar.zst
pttbbs-5435ec7642de4b788008940ccb0d638d32f31380.zip
ID hiding in WATER_NEW.
Wrong condition on angel finding. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2022 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r--mbbsd/talk.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index d28caae5..361f94a7 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -652,6 +652,14 @@ my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t * puin)
i = (water_which->top - watermode + MAX_REVIEW) % MAX_REVIEW;
uin = (userinfo_t *) search_ulist_pid(water_which->msg[i].pid);
+#ifdef PLAY_ANGEL
+ if (water_which->msg[i].msgmode == MSGMODE_FROMANGEL)
+ flag = WATERBALL_ANGEL;
+ else if (water_which->msg[i].msgmode == MSGMODE_TOANGEL)
+ flag = WATERBALL_ANSWER;
+ else
+ flag = WATERBALL_GENERAL;
+#endif
strlcpy(destid, water_which->msg[i].userid, sizeof(destid));
}
} else {
@@ -2845,7 +2853,7 @@ FindAngel(void){
j = SHM->currsorted;
for (i = 0; i < SHM->UTMPnumber; ++i)
if ((SHM->sorted[j][0][i]->userlevel & PERM_ANGEL)
- && (SHM->sorted[j][0][j]->angel & mask) == 0)
+ && (SHM->sorted[j][0][i]->angel & mask) == 0)
++nAngel;
if (nAngel == 0)
@@ -2855,10 +2863,12 @@ FindAngel(void){
j = SHM->currsorted;
for (i = 0; i < SHM->UTMPnumber && choose; ++i)
if ((SHM->sorted[j][0][i]->userlevel & PERM_ANGEL)
- && (SHM->sorted[j][0][j]->angel & mask) == 0)
+ && (SHM->sorted[j][0][i]->angel & mask) == 0)
--choose;
- if (choose == 0 && SHM->sorted[j][0][i - 1]->uid != currutmp->uid){
+ if (choose == 0 && SHM->sorted[j][0][i - 1]->uid != currutmp->uid
+ && (SHM->sorted[j][0][i - 1]->userlevel & PERM_ANGEL)
+ && ((SHM->sorted[j][0][i - 1]->angel & mask) == 0)){
strlcpy(cuser.myangel, SHM->sorted[j][0][i - 1]->userid, IDLEN + 1);
return 1;
}