# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1368798957 -3600
# Node ID 597450c73ce688429dc0b7d5e1042dbf00b2904b
# Parent  8745193e651eb0a6cecb7893533487cd8de89151
prosodyctl: check dns: More concise output (merged separate v4/v6 warnings)

diff -r 8745193e651e -r 597450c73ce6 prosodyctl
--- a/prosodyctl	Fri May 17 14:55:05 2013 +0100
+++ b/prosodyctl	Fri May 17 14:55:57 2013 +0100
@@ -937,12 +937,17 @@
 					end
 				end
 				
+				local bad_protos = {}
 				if not host_ok_v4 then
-					print("    Host "..host.." does not seem to resolve to this server for IPv4");
+					table.insert(bad_protos, "IPv4");
 				end
-				if not host_ok_v6 and v6_supported then
-					print("    Host "..host.." does not seem to resolve to this server for IPv6");
-				elseif host_ok_v6 and not v6_supported then
+				if not host_ok_v6 then
+					table.insert(bad_protos, "IPv6");
+				end
+				if #bad_protos > 0 then
+					print("    Host "..host.." does not seem to resolve to this server ("..table.concat(bad_protos, "/")..")");
+				end
+				if host_ok_v6 and not v6_supported then
 					print("    Host "..host.." has AAAA records, but your version of LuaSocket does not support IPv6.");
 					print("      Please see http://prosody.im/doc/ipv6 for more information.");
 				end