diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-03 00:08:30 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-03 00:08:30 +0800 |
commit | b25a423c98a1ef5763b9810d554417546214417d (patch) | |
tree | 6c607913f0c5c89f4101bc289abd8986ec482125 /mbbsd/edit.c | |
parent | c72299766768d9c73ad7ee2eda23afb5033eaec7 (diff) | |
download | pttbbs-b25a423c98a1ef5763b9810d554417546214417d.tar pttbbs-b25a423c98a1ef5763b9810d554417546214417d.tar.gz pttbbs-b25a423c98a1ef5763b9810d554417546214417d.tar.bz2 pttbbs-b25a423c98a1ef5763b9810d554417546214417d.tar.lz pttbbs-b25a423c98a1ef5763b9810d554417546214417d.tar.xz pttbbs-b25a423c98a1ef5763b9810d554417546214417d.tar.zst pttbbs-b25a423c98a1ef5763b9810d554417546214417d.zip |
- angel: allow user to call paged rejnew angel in hh mode, even if angel has not really replied.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4069 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r-- | mbbsd/edit.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 7ddd615a..4058aa05 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1474,25 +1474,11 @@ write_header(FILE * fp, char *mytitle) // FIXME unused if (HasUserPerm(PERM_ANGEL) && currboard && strcmp(currboard, BN_ANGELPRAY) == 0) { - FILE *fpx = NULL; - char xbuf[PATHLEN]; - // try to load angel nick. sorry, dirty code again... - // ref: talk.c, AngelNotOnline. - setuserfile(xbuf, "angelmsg"); - fpx = fopen(xbuf, "rt"); - if (!fpx || !fgets(xbuf, sizeof(xbuf), fpx) || - strncmp(xbuf, "%%[", 3)) - { - strcpy(xbuf+3, "小天使"); - } - else - { - chomp(xbuf); - strlcat(xbuf, "小天使", sizeof(xbuf)); - } - if (fpx) fclose(fpx); + char mynick[IDLEN+1]; + angel_load_my_nick(mynick, sizeof(mynick)); + strlcat(mynick, "小天使", sizeof(mynick)); getdata_str(3, 0, "請輸入想用的名字(輸入[r]為真名): ", - real_name, sizeof(real_name), DOECHO, xbuf+3); + real_name, sizeof(real_name), DOECHO, mynick); } else #endif // PLAY_ANGEL && BN_ANGELPRAY if (defanony) |