summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-12-10 13:42:00 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-12-10 13:42:00 +0800
commit9b109badd098f865e2bb52ad8f1ad33d18d59aeb (patch)
tree789a7eb7e325963420454d0596b532093079d040
parent5dc26db9dce057275a44ee4948c162cbbfe06b4f (diff)
downloadpttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.tar
pttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.tar.gz
pttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.tar.bz2
pttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.tar.lz
pttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.tar.xz
pttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.tar.zst
pttbbs-9b109badd098f865e2bb52ad8f1ad33d18d59aeb.zip
fix last commit
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3453 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/talk.c5
1 files 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);