summaryrefslogtreecommitdiffstats
path: root/mbbsd/record.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-05-24 10:01:57 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-05-24 10:01:57 +0800
commiteff49de645852258333a4c5d7433c81cf00bb2e3 (patch)
tree265a4277a26b8030cf6d78dc2a291ff7e6096015 /mbbsd/record.c
parent2acbcc9a00bd3215b13952438a359d7bec0cf96b (diff)
downloadpttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.tar
pttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.tar.gz
pttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.tar.bz2
pttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.tar.lz
pttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.tar.xz
pttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.tar.zst
pttbbs-eff49de645852258333a4c5d7433c81cf00bb2e3.zip
some idiots just set themselves as auto-forward receiver
and still don't know what does that mean, complaining on SYSOP. althogh the situation of forward loop (a->b->a) is not solved yet, it's good enough now to prevent level 1 idiots. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2732 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/record.c')
-rw-r--r--mbbsd/record.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c
index 288c1749..046e95d8 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -565,7 +565,7 @@ append_record(const char *fpath, const fileheader_t * record, int size)
}
int
-append_record_forward(char *fpath, fileheader_t * record, int size)
+append_record_forward(char *fpath, fileheader_t * record, int size, const char *origid)
{
#if !defined(_BBS_UTIL_C_)
int m, n;
@@ -581,7 +581,7 @@ append_record_forward(char *fpath, fileheader_t * record, int size)
if ((fp = fopen(buf, "r"))) {
fscanf(fp, "%s", address); // XXX check buffer size
fclose(fp);
- if (buf[0] != 0 && buf[0] != ' ') {
+ if (buf[0] != 0 && buf[0] != ' ' && strcmp(buf, origid) != 0) {
buf[n + 1] = 0;
strcat(buf, record->filename);
append_record(fpath, record, size);