summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-14 18:14:55 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-03-14 18:14:55 +0800
commit3b920f88afea0e1bd107610afd21cf21622b0209 (patch)
treed3e411d0d21ec42b847b1ab02de9f8ad84cd0281 /mbbsd/talk.c
parent30aaf378e0410c941dd7d7043aac0505ef44e2e1 (diff)
downloadpttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.gz
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.bz2
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.lz
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.xz
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.tar.zst
pttbbs-3b920f88afea0e1bd107610afd21cf21622b0209.zip
fix bugs
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@25 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r--mbbsd/talk.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index 5edf29a0..8bf45197 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1,4 +1,4 @@
-/* $Id: talk.c,v 1.7 2002/03/14 08:17:45 in2 Exp $ */
+/* $Id: talk.c,v 1.8 2002/03/14 10:14:55 in2 Exp $ */
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -456,9 +456,14 @@ void water_scr(water_t *tw, int which, char type)
else
prints("\033[0m \n");
}
+
+ move(21, 4);prints(" ");
+ move(21, 4);
+ prints("\033[0m \033[1;37;46m%-66s\033[0m \n",
+ tw->msg[5].last_call_in);
+
move(0, 0);prints(" ");
- move(0, 0);
- prints("\033[0m反擊 %s:", tw->userid);
+ move(0, 0);prints("\033[0m反擊 %s:", tw->userid);
clrtoeol();
move(0, strlen(tw->userid) + 6);
}
@@ -508,9 +513,11 @@ void my_write2(void)
move(22, 4);
prints(" \033[1;35m◇\033[1;36m────────────────"
"─────────────────\033[1;35m◇\033[0m ");
+ /*
move(21, 4);prints(" ");
move(21, 4);
prints("\033[0m \033[1;37;46m%-66s\033[0m \n", t_last_write);
+ */
water_scr(swater[0], 0, 1);
refresh();
@@ -560,7 +567,9 @@ void my_write2(void)
80-strlen(tw->userid)-6, DOECHO) )
break;
- my_write(tw->pid, msg, tw->userid, 4, tw->uin);
+ if( my_write(tw->pid, msg, tw->userid, 4, tw->uin) )
+ strncpy(tw->msg[5].last_call_in, t_last_write,
+ sizeof(tw->msg[5].last_call_in));
break;
}
} while( !done );
@@ -701,7 +710,7 @@ int my_write(pid_t pid, char *prompt, char *id, int flag, userinfo_t *puin)
} else if (flag != 2)
outmsg("\033[1;33;41m糟糕! 對方不行了! (收到太多水球) \033[37m@_@\033[m");
- if(uin->msgcount == 1 && (uin->pid <= 0 || kill(uin->pid, SIGUSR2) == -1) && flag != 2)
+ if(uin->msgcount >= 1 && (uin->pid <= 0 || kill(uin->pid, SIGUSR2) == -1) && flag != 2)
outmsg("\033[1;33;41m糟糕! 沒打中! \033[37m~>_<~\033[m");
else if(uin->msgcount == 1 && flag != 2)
outmsg("\033[1;33;44m水球砸過去了! \033[37m*^o^*\033[m");