# HG changeset patch # User Kim Alvefur # Date 1328711616 -3600 # Node ID 55ef5d83d00a797afb47958446e3f16738f8b462 # Parent 9454d237cf7cdfd33211c271d5290343a5e8337b util.prosodyctl: In the register command, check that the virtual exists before proceeding. diff -r 9454d237cf7c -r 55ef5d83d00a util/prosodyctl.lua --- a/util/prosodyctl.lua Fri Dec 16 16:01:59 2011 +0000 +++ b/util/prosodyctl.lua Wed Feb 08 15:33:36 2012 +0100 @@ -121,7 +121,11 @@ return false, "invalid-hostname"; end - local provider = prosody.hosts[host].users; + local host = prosody.hosts[host]; + if not host then + return false, "no-such-host"; + end + local provider = host.users; if not(provider) or provider.name == "null" then usermanager.initialize_host(host); end