diff options
-rw-r--r-- | mbbsd/io.c | 24 | ||||
-rw-r--r-- | mbbsd/talk.c | 13 |
2 files changed, 21 insertions, 16 deletions
@@ -1,4 +1,4 @@ -/* $Id: io.c,v 1.3 2002/03/14 08:17:45 in2 Exp $ */ +/* $Id: io.c,v 1.4 2002/03/14 20:49:38 in2 Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -336,18 +336,20 @@ int igetch() { return ch; case Ctrl('W'): - if(watermode >0) - { - water_which_flag=(water_which_flag+water_usies)%(water_usies+1); - if(water_which_flag==0) + if( WATERMODE(WATER_NEW) ){ + if( watermode > 0 ){ + water_which_flag=(water_which_flag+water_usies)%(water_usies+1); + if(water_which_flag==0) water_which = &water[0]; - else + else water_which = swater[water_which_flag-1]; - watermode = 1; - t_display_new(); - continue; - } - else return ch; + watermode = 1; + t_display_new(); + continue; + } + } + return ch; + default: return ch; } diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 8bf45197..c87277d6 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1,4 +1,4 @@ -/* $Id: talk.c,v 1.8 2002/03/14 10:14:55 in2 Exp $ */ +/* $Id: talk.c,v 1.9 2002/03/14 20:49:38 in2 Exp $ */ #include <stdio.h> #include <string.h> #include <errno.h> @@ -607,7 +607,8 @@ int my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t *puin) outmsg("\033[1;33;41m糟糕! 對方已落跑了(不在站上)! \033[37m~>_<~\033[m"); clrtoeol(); refresh(); - watermode = -1; + if( !WATERMODE(WATER_OFO) ) + watermode = -1; return 0; } currutmp->mode = 0; @@ -655,12 +656,14 @@ int my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t *puin) currutmp->chatid[0] = c0; currutmp->mode = mode0; currstat = currstat0; - watermode = -1; + if( !WATERMODE(WATER_OFO) ) + watermode = -1; return 0; } } - watermode = -1; + if( !WATERMODE(WATER_OFO) ) + watermode = -1; if(!uin || !*uin->userid || strcasecmp(destid, uin->userid)) { outmsg("\033[1;33;41m糟糕! 對方已落跑了(不在站上)! \033[37m~>_<~\033[m"); clrtoeol(); @@ -793,7 +796,7 @@ void t_display_new(void) move(i + off, 0); outs("──────────────────────" "─────────────────"); - if( WATERMODE(WATER_NEW)) + if( WATERMODE(WATER_NEW) ) while( i++ <= water[0].count ) { move(i + off, 0); clrtoeol(); |