git-svn-id: http://svn.automattic.com/wordpress/trunk@2082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-01-11 18:47:07 +00:00
parent b8190acec8
commit 69291131ff
1 changed files with 2 additions and 1 deletions

View File

@ -447,9 +447,10 @@ function wp_new_comment( $commentdata, $spam = false ) {
if ( $lasttime = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author_IP = '$user_ip' OR comment_author_email = '$email' ORDER BY comment_date DESC LIMIT 1") ) {
$time_lastcomment = mysql2date('U', $lasttime);
$time_newcomment = mysql2date('U', $now_gmt);
if ( ($time_newcomment - $time_lastcomment) < 15 )
if ( ($time_newcomment - $time_lastcomment) < 15 ) {
do_action('comment_flood_trigger', '');
die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') );
}
}
if ( check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $comment_type) )