Topic: Quick anti-spam mod: Increased post flood interval for new posters
I've found the main problem I have with spam is a persistent spammer (or smart bot) posting a flurry of spam posts before I have time to notice and ban the user.
So this is a quick mod that increases the flood interval for new posters. Once they've posted a few (legitimate) messages the flood interval will revert to normal.
Just change the following code in post.php (around line 80) to the code below.
// Flood protection
if (!$pun_user['is_guest'] && !isset($_POST['preview']) && $pun_user['last_post'] != '' && (time() - $pun_user['last_post']) < $pun_user['g_post_flood'])
$errors[] = $lang_post['Flood start'].' '.$pun_user['g_post_flood'].' '.$lang_post['flood end']; // Flood protection
if (!$pun_user['is_guest'] && !isset($_POST['preview']) && $pun_user['last_post'] != '') {
// Limit users with less than 4 posts to one post every 4 hours (14400 seconds)
if ($pun_user['num_posts'] < 4 && (time() - $pun_user['last_post']) < 14400)
$errors[] = 'New posters are limited to one post per four hours to prevent spam. Please save your text and try posting again soon. This limitation will be automatically removed after your first few posts.';
// Normal flood protection
elseif ((time() - $pun_user['last_post']) < $pun_user['g_post_flood'])
$errors[] = $lang_post['Flood start'].' '.$pun_user['g_post_flood'].' '.$lang_post['flood end'];
}Just wanted to share and make sure I'm not coding anything wrong. (I suppose I should set the required number of posts and increased flood interval as variables, but aside from that.
)