X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dadde570a1f735143e9f5909ede743b9aed97444..e0406eadd387f2a1dc56c8034504bc5d127dae28:/IkiWiki/Plugin/comments.pm?ds=sidebyside

diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 98ae13810..c5177833f 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -468,12 +468,15 @@ sub editcomment ($$) {
 		$username =~ s/"/"/g;
 		$content .= " username=\"$username\"\n";
 	}
+
 	if (defined $session->param('nickname')) {
 		my $nickname = $session->param('nickname');
 		$nickname =~ s/"/"/g;
 		$content .= " nickname=\"$nickname\"\n";
 	}
-	elsif (defined $session->remote_addr()) {
+
+	if (!(defined $session->param('name') || defined $session->param('nickname')) &&
+		defined $session->remote_addr()) {
 		$content .= " ip=\"".$session->remote_addr()."\"\n";
 	}