From 0d7ecce88f3018713fbf54213ab8acd6134dc903 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 22 Mar 2009 15:02:07 +0000 Subject: mod_component: Use net_activate_ports to start port listener based on config --- plugins/mod_component.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins/mod_component.lua') diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua index f4b0d51c..90a2f3b1 100644 --- a/plugins/mod_component.lua +++ b/plugins/mod_component.lua @@ -214,4 +214,11 @@ end 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); -- cgit v1.2.3