Index: comment.php
===================================================================
--- comment.php	(revision 15480)
+++ comment.php	(working copy)
@@ -1261,8 +1261,15 @@
 	$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'])){ // If IP is not passed in take the clients IP  
+		$commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR'];
+	}
+	$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '', $commentdata['comment_author_IP'] );
+	
+	if(!isset($commentdata['comment_agent'])){ // If user agent is not passed in take the clients user agent
+		$commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT'];
+	}
+	$commentdata['comment_agent']     = substr($commentdata['comment_agent'], 0, 254);
 
 	$commentdata['comment_date']     = current_time('mysql');
 	$commentdata['comment_date_gmt'] = current_time('mysql', 1);
