summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-01-02 17:19:07 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-01-02 17:19:07 +0800
commitfeef527b85c1b9d280f284937ed2a4d632c501b8 (patch)
treebe7b947ffad9c79267dacfc041d880a420e772c1 /mbbsd
parent8005569c26f4a9709cce1b95a9b79339912c1f1a (diff)
downloadpttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.tar
pttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.tar.gz
pttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.tar.bz2
pttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.tar.lz
pttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.tar.xz
pttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.tar.zst
pttbbs-feef527b85c1b9d280f284937ed2a4d632c501b8.zip
NOKILLWATERBALL: fix bug?
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1447 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 8371d7aa..147536e0 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -362,27 +362,15 @@ write_request(int sig)
reentrant_write_request = 1;
#endif
if (WATERMODE(WATER_OFO)) {
- /*
- * sig = SIGUSR2 waterball come in 0 flush to water[] (by
- * my_write2())
- */
- if (sig != 0) {
- if (wmofo == 0) /* 正在回水球 */
- wmofo = 1;
- bell();
- show_call_in(1, currutmp->msgcount - 1);
- refresh();
- }
- if (sig == 0 || /* 回水球的時候又有水球進來, 回完後一次寫回去 */
- wmofo == -1) { /* 不在回水球模式 */
- do {
- add_history(&currutmp->msgs[0]);
- if (currutmp->msgcount--)
- for (i = 0; i < currutmp->msgcount; i++)
- currutmp->msgs[i] = currutmp->msgs[i + 1];
+ int i, msgcount;
+ if( (msgcount = currutmp->msgcount) > 0 ){
+ for( i = 0 ; i < msgcount ; ++i ){
+ bell();
+ show_call_in(1, i);
+ refresh();
+ add_history(&currutmp->msgs[i]);
}
- while (currutmp->msgcount);
- currutmp->msgcount = 0;
+ currutmp->msgcount -= msgcount;
}
} else {
if (currutmp->mode != 0 &&