# HG changeset patch # User Matthew Wild # Date 1237734127 0 # Node ID 27d909db471403a897ffca1ba303e897342b9b47 # Parent 505a2cbb823db0e92dc589f28b55fd7af7a18f0f mod_component: Use net_activate_ports to start port listener based on config diff -r 505a2cbb823d -r 27d909db4714 plugins/mod_component.lua --- 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);