prosody

changeset 1576
0cfc7eb6957b
parent 1523
841d61be198f
child 1582
80d3d95aa83c
child 1620
7acb630bdac9
--- a/prosody	Thu Jul 23 02:32:00 2009 +0100
+++ b/prosody	Thu Jul 23 02:33:10 2009 +0100
@@ -188,6 +188,7 @@
 
 -- start listening on sockets
 function net_activate_ports(option, listener, default, conntype)
+	if not cl.get(listener) then return; end
 	local ports = config.get("*", "core", option.."_ports") or default;
 	if type(ports) == "number" then ports = {ports} end;
 	
@@ -215,10 +216,7 @@
 net_activate_ports("s2s", "xmppserver", {5269}, "tcp");
 net_activate_ports("component", "xmppcomponent", {}, "tcp");
 net_activate_ports("legacy_ssl", "xmppclient", {}, "ssl");
-
-if cl.get("console") then
-	cl.start("console", { interface = config.get("*", "core", "console_interface") or "127.0.0.1" })
-end
+net_activate_ports("console", "console", {5582}, "tcp");
 
 -- Catch global accesses --
 local locked_globals_mt = { __index = function (t, k) error("Attempt to read a non-existent global '"..k.."'", 2); end, __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end }

mercurial