diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-05-06 22:58:30 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-05-06 22:58:30 +0800 |
commit | 349546bad375aaeae458ed989c691a1fe00b1c39 (patch) | |
tree | 14439a7a38943a75f808eaa642cea7aabfd11f5f /mbbsd/cache.c | |
parent | 1a3e5b7119064b6d9e21d2c8531e091624d17f10 (diff) | |
download | pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.tar pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.tar.gz pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.tar.bz2 pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.tar.lz pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.tar.xz pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.tar.zst pttbbs-349546bad375aaeae458ed989c691a1fe00b1c39.zip |
1.kick people before give them ticket.
2.set bad post -> 1 hour can't post.
3.maxiam 9 post whin 3 min.
4.one ticket for every 5 bad post.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2716 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 703f0855..626ab06d 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1037,8 +1037,16 @@ hbflcheck(int bid, int uid) #ifdef USE_COOLDOWN void add_cooldowntime(int uid, int min) { - time4_t new = now + 60 * min; - time4_t old = SHM->cooldowntime[uid - 1]; - SHM->cooldowntime[uid - 1] = new > old ? new : old; + // Ptt: I will use the number below 15 seconds. + time4_t base = (now & 0xFFFFFFF0) + 1; + + if(base < SHM->cooldowntime[uid - 1]) + base = SHM->cooldowntime[uid - 1]; + + SHM->cooldowntime[uid - 1] = base + min*60; +} +void add_posttimes(int uid, int times) +{ + SHM->cooldowntime[uid - 1] + times; } #endif |