summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2012-02-02 10:06:31 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2012-02-02 10:06:31 +0800
commita2badf4ef3a202545651b43d04498c5eff0a7c12 (patch)
treee40b46784a6bbc7d97cb407f1e15d75dec0a618d
parent38b62c052893ed87a96baeb833714dec9575f4dd (diff)
downloadpttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.tar
pttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.tar.gz
pttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.tar.bz2
pttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.tar.lz
pttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.tar.xz
pttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.tar.zst
pttbbs-a2badf4ef3a202545651b43d04498c5eff0a7c12.zip
Try harder to remove cp/spam user posts
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5543 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/bbs.c4
-rw-r--r--pttbbs/mbbsd/user.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index b2be4778..e7fe5f16 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/mbbsd/bbs.c
@@ -227,8 +227,8 @@ anticrosspost(void)
pwcuViolateLaw();
mail_id(cuser.userid, "Cross-Post罰單",
"etc/crosspost.txt", BBSMNAME "警察部隊");
- if (cuser.numlogindays < 50 || cuser.numposts < 50)
- delete_allpost(cuser.userid);
+ // Delete all references from BN_ALLPOST, if available.
+ delete_allpost(cuser.userid);
kick_all(cuser.userid); // XXX: in2: wait for testing
u_exit("Cross Post");
exit(0);
diff --git a/pttbbs/mbbsd/user.c b/pttbbs/mbbsd/user.c
index 3400030a..43693131 100644
--- a/pttbbs/mbbsd/user.c
+++ b/pttbbs/mbbsd/user.c
@@ -402,6 +402,8 @@ violate_law(userec_t * u, int unum)
u->timeviolatelaw = now;
u->vl_count++;
passwd_sync_update(unum, u);
+ if (*ans == '1' || *ans == '2')
+ delete_allpost(u->userid);
post_violatelaw(u->userid, cuser.userid, reason, "罰單處份");
mail_violatelaw(u->userid, "站務警察", reason, "罰單處份");
}