Updated for V3 credit to original author
Have it up on test site seems fine if anyone wants to test
[color=rgb(251, 160, 38)]in config.php add[/color]
[color=rgb(251, 160, 38)]in comments.php find[/color]
add after
[color=rgb(251, 160, 38)]in forums.php find[/color]
replace with
[color=rgb(251, 160, 38)]in mailbox.php find[/color]
add after
Have it up on test site seems fine if anyone wants to test
[color=rgb(251, 160, 38)]in config.php add[/color]
$site_config["floodsize"] = 1000; // Maximum size of messages, forumposts, comments
$site_config["floodlimit"] = 10; // Amount of sources before to be considered flood
$site_config["floodtime"] = 10; // Time between messages, forumposts, comments
[color=rgb(251, 160, 38)]in comments.php find[/color]
if (!$body)
show_error_msg(T_("ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);
add after
//===| Anti-Flood
if ( strlen($body) > $site_config['floodsize'] )
show_error_msg("Error", "Your comment is too big, only $site_config[floodsize] characters are allowed.", 1);
$res = SQL_Query_exec("SELECT COUNT(*) FROM `comments` WHERE user = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config["floodtime"] * 60)) . "'");
$row = mysqli_fetch_row($res);
if ($row[0] > $site_config["floodlimit"])
show_error_msg("Error", "You are only prohibited $site_config[floodlimit] comments in $site_config[floodtime] minutes.", 1);
//===| End
[color=rgb(251, 160, 38)]in forums.php find[/color]
$added = "'" . get_date_time() . "'";
$body = sqlesc($body);replace with
//===| Anti-Flood
if ( strlen($body) > $site_config['floodsize'] )
show_error_msg("Error", "Your post is too big, only $site_config['floodsize'] characters are allowed.", 1);
//===| End
//Insert the new post
$added = "'" . get_date_time() . "'";
$body = sqlesc($body);
//===| Anti-Flood
$res = SQL_Query_exec("SELECT COUNT(*) FROM `forum_posts` WHERE userid = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config['floodtime'] * 60)) . "'");
$row = mysqli_fetch_row($res);
if ($row[0] > $site_config['floodlimit'])
show_error_msg("Error", "You are only prohibited $site_config[floodlimit] forumposts in $site_config[floodtime] minutes.", 1);
//===| End [color=rgb(251, 160, 38)]in mailbox.php find[/color]
$status = (@$_POST['send'] ? 'yes' : 'no');add after
//===| Anti-Flood
if ( strlen($msg) > $site_config["floodsize"] )
show_error_msg("Error", "Your message is too big, only $site_config[floodsize] characters are allowed.", 1);
$res = SQL_Query_exec("SELECT COUNT(*) FROM `messages` WHERE sender = $CURUSER[id] AND added > '" . get_date_time(gmtime() - ($site_config['floodtime'] * 60)) . "'");
$row = mysqli_fetch_row($res);
if ($row[0] > $site_config["floodlimit"])
show_error_msg("Error", "You are only prohibited $site_config[floodlimit] messages in $site_config[floodtime] minutes.", 1);
//===| End
