summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-11 19:15:47 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-11 19:15:47 +0800
commit86c8b04658f0f6bdbc311d44637c80a04b69d03a (patch)
tree7e39eda69e23e01277fd2a4b25594db8fdcae093 /mbbsd
parentc7b8642cf179fea32b2e97a8035ba0a083e83190 (diff)
downloadpttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.tar
pttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.tar.gz
pttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.tar.bz2
pttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.tar.lz
pttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.tar.xz
pttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.tar.zst
pttbbs-86c8b04658f0f6bdbc311d44637c80a04b69d03a.zip
fix ofo's alive bug
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@19 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/talk.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index b59330a9..328e4453 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.4 2002/03/09 16:54:32 in2 Exp $ */
+/* $Id: talk.c,v 1.5 2002/03/11 11:15:47 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -522,11 +522,10 @@ void my_write2(void)
if( currwater[i] == NULL || currwater[i]->pid == 0 )
break;
else{
- if( currwater[i]->uin == NULL )
- currwater[i]->uin =
- (userinfo_t *)search_ulist_pid(currwater[i]->pid);
- currwater[i]->alive = (strcmp(currwater[i]->userid,
- currwater[i]->uin->userid) == 0);
+ if( currwater[i]->alive &&
+ (currwater[i]->pid != currwater[i]->uin->pid ||
+ strcmp(currwater[i]->userid, currwater[i]->uin->userid)) )
+ currwater[i]->alive = 0;
water_scr(currwater, i, 0);
}
move(15, 4);
@@ -573,6 +572,9 @@ void my_write2(void)
watermode = 1;
tw = currwater[(int)which];
+ if( !tw->alive )
+ break;
+
if( ch != '\r' && ch != '\n' ){
msg[0] = ch, msg[1] = 0;
}