summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-16 23:11:10 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-16 23:11:10 +0800
commitf79d7ef296f497b75d91a7770c7c1abce36961a4 (patch)
tree38f12efc08dc53260fba13eef21686bbd6904274 /mbbsd
parent29d876cdef4b32738321498a77ba833d828bfbe4 (diff)
downloadpttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.tar
pttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.tar.gz
pttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.tar.bz2
pttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.tar.lz
pttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.tar.xz
pttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.tar.zst
pttbbs-f79d7ef296f497b75d91a7770c7c1abce36961a4.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@31 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/io.c46
-rw-r--r--mbbsd/mbbsd.c9
-rw-r--r--mbbsd/talk.c19
3 files changed, 40 insertions, 34 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 82c5d93c..b0331074 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -1,4 +1,4 @@
-/* $Id: io.c,v 1.6 2002/03/16 13:18:59 ptt Exp $ */
+/* $Id: io.c,v 1.7 2002/03/16 15:11:09 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -240,7 +240,25 @@ int igetch() {
case Ctrl('R'):
if(currutmp == NULL)
return (ch);
- if( WATERMODE(WATER_ORIG) || WATERMODE(WATER_NEW) ){
+
+ if( currutmp->msgs[0].pid &&
+ WATERMODE(WATER_OFO) && wmofo == -1 ){
+ int y, x, my_newfd;
+ screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t));
+ memcpy(screen0, big_picture, t_lines * sizeof(screenline_t));
+ getyx(&y, &x);
+ my_newfd = i_newfd;
+ i_newfd = 0;
+ my_write2();
+ memcpy(big_picture, screen0, t_lines * sizeof(screenline_t));
+ i_newfd = my_newfd;
+ move(y, x);
+ free(screen0);
+ redoscr();
+ continue;
+ }
+ else if(!WATERMODE(WATER_OFO))
+ {
if( watermode > 0 ){
watermode = (watermode + water_which->count)
% water_which->count + 1;
@@ -255,7 +273,7 @@ int igetch() {
t_display_new();
continue;
}
- else if(currutmp->msgs[0].pid) {
+ else if(watermode==-1 && currutmp->msgs[0].pid) {
/* 第一次按 Ctrl-R (必須先被丟過水球) */
screenline_t *screen0;
int y, x, my_newfd;
@@ -279,27 +297,7 @@ int igetch() {
redoscr();
continue;
}
- else
- return ch;
- }
-
- if( currutmp->msgs[0].pid &&
- WATERMODE(WATER_OFO) && wmofo == -1 ){
- int y, x, my_newfd;
- screenline_t *screen0 = calloc(t_lines, sizeof(screenline_t));
- memcpy(screen0, big_picture, t_lines * sizeof(screenline_t));
- getyx(&y, &x);
- my_newfd = i_newfd;
- i_newfd = 0;
- my_write2();
- memcpy(big_picture, screen0, t_lines * sizeof(screenline_t));
- i_newfd = my_newfd;
- move(y, x);
- free(screen0);
- redoscr();
- continue;
- }
-
+ }
return ch;
case '\n': /* Ptt把 \n拿掉 */
continue;
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index b55cbe23..265a4d74 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.9 2002/03/16 13:18:59 ptt Exp $ */
+/* $Id: mbbsd.c,v 1.10 2002/03/16 15:11:10 ptt Exp $ */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -379,6 +379,7 @@ add_history(msgque_t *msg)
swater[i] = &water[i + 1];
strcpy(swater[i]->userid, msg->userid);
swater[i]->pid = msg->pid;
+ swater[i]->uin = (userinfo_t *)search_ulist_pid(msg->pid);
}
tmp = swater[i];
}
@@ -387,6 +388,7 @@ add_history(msgque_t *msg)
memset(swater[4], 0, sizeof (water_t));
strcpy(swater[4]->userid, msg->userid);
swater[4]->pid = msg->pid;
+ swater[4]->uin = (userinfo_t *)search_ulist_pid(msg->pid);
i = 4;
}
@@ -403,8 +405,7 @@ add_history(msgque_t *msg)
watermode++;
t_display_new();
}
- }else
- swater[0]->uin = (userinfo_t *)search_ulist_pid(swater[0]->pid);
+ }
return i;
}
@@ -894,7 +895,7 @@ user_login ()
if (cuser.userlevel){/* not guest */
move (t_lines - 4, 0);
- prints (" 歡迎您第 \033[1;33m%d\033[0;37m 度拜訪本站,"
+ prints ("\033[m 歡迎您第 \033[1;33m%d\033[0;37m 度拜訪本站,"
"上次您是從 \033[1;33m%s\033[0;37m 連往本站,\n"
" 我記得那天是 \033[1;33m%s\033[0;37m。\n",
++cuser.numlogins, cuser.lasthost, Cdate (&cuser.lastlogin));
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 8516a5a9..0f0b66fe 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.12 2002/03/16 13:38:36 ptt Exp $ */
+/* $Id: talk.c,v 1.13 2002/03/16 15:11:10 ptt Exp $ */
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -741,17 +741,24 @@ void t_display_new(void)
outs("───────水─球─回─顧───");
outs(WATERMODE(WATER_ORIG) ?
"──────用[Ctrl-R Ctrl-T]鍵切換─────" :
- "用[Ctrl-R Ctrl-T Ctrl-E Ctrl-W ]鍵切換────");
+ "用[Ctrl-R Ctrl-T Ctrl-F Ctrl-G ]鍵切換────");
if( WATERMODE(WATER_NEW) ){
move(2, 0);
clrtoeol();
for (i = 0; i<6 ; i++){
if(i>0)
if(swater[i-1])
- prints("%s%-13.13s\033[m",
- !swater[i-1]->uin?"\033[1;33;45mX":
- swater[i-1]==water_which?"\033[1;33;47m ":
- " ",swater[i-1]->userid);
+ {
+ if(swater[i-1]->uin &&
+ swater[i-1]->uin->pid!=swater[i-1]->pid)
+ swater[i-1]->uin=NULL;
+ prints("%s%c%-13.13s\033[m",
+ swater[i-1]!=water_which? "" :
+ swater[i-1]->uin?"\033[1;33;47m":
+ "\033[1;33;45m",
+ !swater[i-1]->uin?'#':' ',
+ swater[i-1]->userid);
+ }
else
prints(" ");
else