summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-17 21:01:38 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-17 21:01:38 +0800
commitd614107a27ea750a3c6363ce608af9e2a88efbe1 (patch)
tree77d41034e6948500ce0b0a017497ee65d82ee826 /mbbsd
parent240e8f14ae26ddc2b375fc04bd6866d99ad1e880 (diff)
downloadpttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.tar
pttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.tar.gz
pttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.tar.bz2
pttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.tar.lz
pttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.tar.xz
pttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.tar.zst
pttbbs-d614107a27ea750a3c6363ce608af9e2a88efbe1.zip
- change the permission for police to kill user from "numlogin/numpost < 100" to "regdate < 60".
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4178 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/user.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 88848b77..a4c28146 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -320,8 +320,18 @@ violate_law(userec_t * u, int unum)
if (*ans2 != 'y')
return;
if (ans[0] == '9') {
- if (HasUserPerm(PERM_POLICE) && (u->numlogins > 100 || u->numposts > 100))
+ // 20080417, according to the request of admins, the numpost>100
+ // if very easy to achive for such bad users (of course, because
+ // usually they violate law by massive posting).
+ // Also if he wants to prevent system auto cp check, he will
+ // post -> logout -> login -> post. So both numlogin and numpost
+ // are not good.
+ // We changed the rule to registration date [2 month].
+ if (HasUserPerm(PERM_POLICE) && ((now - u->firstlogin) >= 2*30*86400))
+ {
+ vmsg("使用者註冊已超過 60 天,無法砍除。");
return;
+ }
kill_user(unum, u->userid);
post_violatelaw(u->userid, cuser.userid, reason, "砍除 ID");