Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 23297)
+++ wp-includes/comment.php	(working copy)
@@ -1387,12 +1387,22 @@
 	$parent_status = ( 0 < $commentdata['comment_parent'] ) ? wp_get_comment_status($commentdata['comment_parent']) : '';
 	$commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0;
 
-	$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] );
-	$commentdata['comment_agent']     = substr($_SERVER['HTTP_USER_AGENT'], 0, 254);
+	if ( ! isset( $commentdata['comment_author_IP'] ) )
+		$commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR'];
 
-	$commentdata['comment_date']     = current_time('mysql');
-	$commentdata['comment_date_gmt'] = current_time('mysql', 1);
+	$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '', $commentdata['comment_author_IP'] );
 
+	if ( ! isset( $commentdata['comment_agent'] ) )
+		$commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT'];
+
+	$commentdata['comment_agent'] = substr( $commentdata['comment_agent'], 0, 254 );
+
+	if ( ! isset( $commentdata['comment_date'] ) )
+		$commentdata['comment_date'] = current_time('mysql');
+
+	if ( ! isset( $commentdata['comment_date_gmt'] ) )
+		$commentdata['comment_date_gmt'] = current_time('mysql', 1);
+
 	$commentdata = wp_filter_comment($commentdata);
 
 	$commentdata['comment_approved'] = wp_allow_comment($commentdata);
