summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-28 01:08:48 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-28 01:08:48 +0800
commit45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3 (patch)
tree75b73a3b066ace2346822665012b980eb60f841e /mbbsd
parent0d6868238e0b9f4351182864d360a6729f2f604f (diff)
downloadpttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.tar
pttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.tar.gz
pttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.tar.bz2
pttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.tar.lz
pttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.tar.xz
pttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.tar.zst
pttbbs-45c4ade994c1073bb6a68f3e8fb4c61a7463eaf3.zip
hide when debugsleep
try to prevent segv in waterball git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3216 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/talk.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index b86a471b..2c5d7527 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -65,6 +65,10 @@ isvisible_stat(const userinfo_t * me, const userinfo_t * uentp, int fri_stat)
if (!uentp || uentp->userid[0] == 0)
return 0;
+ /* to avoid paranoid users get crazy*/
+ if (uentp->mode == DEBUGSLEEPING)
+ return 0;
+
if (PERM_HIDE(uentp) && !(PERM_HIDE(me))) /* 對方紫色隱形而你沒有 */
return 0;
else if ((me->userlevel & PERM_SYSOP) ||
@@ -678,7 +682,7 @@ my_write(pid_t pid, const char *prompt, const char *id, int flag, userinfo_t * p
* will this situation cause SEGV?
* should this "!uin &&" replaced by "!uin ||" ?
*/
- if (!uin && !((flag == WATERBALL_GENERAL
+ if ((!uin || !uin->userid[0]) && !((flag == WATERBALL_GENERAL
#ifdef PLAY_ANGEL
|| flag == WATERBALL_ANGEL || flag == WATERBALL_ANSWER
#endif
@@ -712,14 +716,17 @@ my_write(pid_t pid, const char *prompt, const char *id, int flag, userinfo_t * p
break;
case PAGER_FRIENDONLY:
- if (uin)
+#if 0
+ // 如果對方正在下站,這個好像不太穩會 crash (?) */
+ if (uin && uin->userid[0])
{
fri_stat = friend_stat(currutmp, uin);
if(fri_stat & HFM)
break;
}
+#endif
move(1, 0); clrtoeol();
- outs(ANSI_COLOR(1;31) "你的呼叫器目前只接受好友丟水球,對方可能無法回話。" ANSI_RESET);
+ outs(ANSI_COLOR(1;31) "你的呼叫器目前只接受好友丟水球,若對方非好友則可能無法回話。" ANSI_RESET);
break;
}