diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-03-22 15:02:07 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-03-22 15:02:07 +0000 |
commit | 0d7ecce88f3018713fbf54213ab8acd6134dc903 (patch) | |
tree | b958bf15a346803abd8e6f4856af2487adcc2943 /plugins/mod_component.lua | |
parent | 9eadfb191e3b102a8659d80e6b672777a162c907 (diff) | |
download | prosody-0d7ecce88f3018713fbf54213ab8acd6134dc903.tar.gz prosody-0d7ecce88f3018713fbf54213ab8acd6134dc903.zip |
mod_component: Use net_activate_ports to start port listener based on config
Diffstat (limited to 'plugins/mod_component.lua')
-rw-r--r-- | plugins/mod_component.lua | 9 |
1 files changed, 8 insertions, 1 deletions
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); |