Software /
code /
prosody
Diff
plugins/mod_component.lua @ 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 |
parent | 909:505a2cbb823d |
child | 914:50850f15340c |
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);