Changeset

5616:a79c6717ee2b

prosodyctl: check config: Show a suggestion to change hosts that begin with jabber/xmpp/chat/im subdomains, and link to DNS documentation
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 May 2013 13:18:56 +0100
parents 5615:b678868cf2d8
children 5617:783078bc111c
files prosodyctl
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Tue May 21 12:58:57 2013 +0100
+++ b/prosodyctl	Tue May 21 13:18:56 2013 +0100
@@ -820,7 +820,15 @@
 				print("");
 				print("    You need to move the following option"..(n>1 and "s" or "")..": "..table.concat(it.to_array(misplaced_options), ", "));
 			end
+			local subdomain = host:match("^[^.]+");
+			if not(is_component) and (subdomain == "jabber" or subdomain == "xmpp"
+			   or subdomain == "chat" or subdomain == "im") then
+			   	print("    Suggestion: If "..host.. " is a new host with no real users yet, consider renaming it now to");
+			   	print("     "..host:gsub("^[^.]+%.", "")..". You can use SRV records to redirect XMPP clients and servers to "..host..".");
+			   	print("     For more information see: http://prosody.im/doc/dns");
+			end
 		end
+		
 		print("Done.\n");
 	end
 	if not what or what == "dns" then