diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-19 18:56:41 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-09-19 18:56:41 +0800 |
commit | e2cacd9a06a79d075b51562a5d23711c34417aa1 (patch) | |
tree | 863b0914d4ee677b5abd78bc8ebb29ed2caa9dbc | |
parent | a86879c28cbc600e12294a615ce6c210ef743521 (diff) | |
download | pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.tar pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.tar.gz pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.tar.bz2 pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.tar.lz pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.tar.xz pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.tar.zst pttbbs-e2cacd9a06a79d075b51562a5d23711c34417aa1.zip |
* mark auto-forward in mail title because some users just does not understand what they've done.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4862 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/record.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/record.c b/pttbbs/mbbsd/record.c index bd0f9ab7..8e311bb4 100644 --- a/pttbbs/mbbsd/record.c +++ b/pttbbs/mbbsd/record.c @@ -432,6 +432,7 @@ append_record_forward(char *fpath, fileheader_t * record, int size, const char * for (n = strlen(fpath) - 1; fpath[n] != '/' && n > 0; n--); if (n + sizeof(".forward") > sizeof(buf)) return -1; + memcpy(buf, fpath, n+1); strcpy(buf + n + 1, ".forward"); if ((fp = fopen(buf, "r"))) { @@ -460,12 +461,18 @@ append_record_forward(char *fpath, fileheader_t * record, int size, const char * } if (buf[0] && buf[0] != ' ' && !flIdiotSent2Self) { + char fwd_title[STRLEN] = ""; buf[n + 1] = 0; strcat(buf, record->filename); append_record(fpath, record, size); // because too many user set wrong forward address, - // let's but them instead. - bsmtp(buf, record->title, address, origid); + // let's put their own address instead. + // and again because some really stupid user + // does not understand they've set auto-forward, + // let's mark this in the title. + snprintf(fwd_title, sizeof(fwd_title)-1, + "[¦Û°ÊÂà±H] %s", record->title); + bsmtp(buf, fwd_title, address, origid); return 0; } } |