Changeset

910:27d909db4714

mod_component: Use net_activate_ports to start port listener based on config
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Mar 2009 15:02:07 +0000 (2009-03-22)
parents 909:505a2cbb823d
children 911:39133bca5938
files plugins/mod_component.lua
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_component.lua	Sun Mar 22 15:01:23 2009 +0000
+++ b/plugins/mod_component.lua	Sun Mar 22 15:02:07 2009 +0000
@@ -214,4 +214,11 @@
 
 connlisteners.register('component', component_listener);
 
-module:add_event_hook("server-starting", function () connlisteners.start("component"); end);
+module:add_event_hook("server-started", 
+	function ()
+		if net_activate_ports then
+			net_activate_ports("component_ports", "component", {5437}, "tcp");
+		else
+			error("No net_activate_ports: Using an incompatible version of Prosody?");
+		end
+	end);