[size=14px]This is another very useful mod that unfortunately now missing...[/size]
Open backend/config.php
Add:
// Anti-Flood Settings
$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
Open comments.php
After:
if (!$body)
show_error_msg(T_("ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);
Add:
//===| 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 = mysql_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
Open forums.php
Replace:
//Insert the new post
$added = "'" . get_date_time() . "'";
$body = sqlesc($body);
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 = mysql_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
Open mailbox.php
After:
$status = (@$_POST['send'] ? 'yes' : 'no');
Add:
Open backend/config.php
Add:
// Anti-Flood Settings
$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
Open comments.php
After:
if (!$body)
show_error_msg(T_("ERROR"), T_("YOU_DID_NOT_ENTER_ANYTHING"), 1);
Add:
//===| 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 = mysql_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
Open forums.php
Replace:
//Insert the new post
$added = "'" . get_date_time() . "'";
$body = sqlesc($body);
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 = mysql_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
Open mailbox.php
After:
$status = (@$_POST['send'] ? 'yes' : 'no');
Add:
//===| 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 = mysql_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