diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 19:16:20 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 19:16:20 +0800 |
commit | afd40b73c635e700c5ba4dda6a3e162c78ea52cd (patch) | |
tree | f44743947dd1e0c224cb9e283e12fc2c35ac73d7 /mbbsd/record.c | |
parent | 807cb49589fc868ebe470807e5bef7228568e53f (diff) | |
download | pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.tar pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.tar.gz pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.tar.bz2 pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.tar.lz pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.tar.xz pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.tar.zst pttbbs-afd40b73c635e700c5ba4dda6a3e162c78ea52cd.zip |
- prevent showing id for anonymous mosts
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4156 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/record.c')
-rw-r--r-- | mbbsd/record.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c index 3f93820f..d6269ce3 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -386,14 +386,23 @@ delete_range(const char *fpath, int id1, int id2) void set_safedel_fhdr(fileheader_t *fhdr) { - if ( strcmp(fhdr->owner, cuser.userid) == 0 || + if (fhdr->filemode & FILE_ANONYMOUS) + { + // not putting owner because we can't know + // if it is deleted by BM or owner. + snprintf(fhdr->title, sizeof(fhdr->title), + "%s", STR_SAFEDEL_TITLE); + } + else if ( strcmp(fhdr->owner, cuser.userid) == 0 || !fhdr->owner[0] || (fhdr->owner[0] == '-' && fhdr->owner[1] == 0) ) { // i'm the one to delete it, or if the owner is corpse. snprintf(fhdr->title, sizeof(fhdr->title), "%s [%s]", STR_SAFEDEL_TITLE, cuser.userid); - } else { + } + else + { snprintf(fhdr->title, sizeof(fhdr->title), "%s [%s](d:%s)", STR_SAFEDEL_TITLE, fhdr->owner, cuser.userid); } |