From 9b109badd098f865e2bb52ad8f1ad33d18d59aeb Mon Sep 17 00:00:00 2001 From: scw Date: Sun, 10 Dec 2006 05:42:00 +0000 Subject: fix last commit git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3453 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/talk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mbbsd/talk.c b/mbbsd/talk.c index d293e949..096d9534 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -3289,8 +3289,8 @@ int t_angelmsg(){ if (fp) { i = 0; if (fgets(msg[0], sizeof(msg[0]), fp)) { + chomp(msg[0]); if (strncmp(msg[0], "%%[", 3) == 0) { - chomp(msg[0]); strlcpy(nick, msg[0] + 3, 7); move(4, 0); prints("­ì¦³¼ÊºÙ¡G%s", nick); @@ -3333,7 +3333,8 @@ int t_angelmsg(){ unlink(buf); else { FILE* fp = fopen(buf, "w"); - fprintf(fp, "%%%%[%s\n", nick); + if(nick[0]) + fprintf(fp, "%%%%[%s\n", nick); for (i = 0; i < 3 && msg[i][0]; ++i) { fputs(msg[i], fp); fputc('\n', fp); -- cgit v1.2.3