diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-03-14 21:39:45 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-03-14 21:39:45 +0000 |
commit | f70f82d6a711b3eb94e800baed00bb87c09eaecd (patch) | |
tree | e38add20b859812d3e4fd775e70b586d7679099a /core | |
parent | 0270a3a90107621947d18bead0b5ed66054317ca (diff) | |
download | prosody-f70f82d6a711b3eb94e800baed00bb87c09eaecd.tar.gz prosody-f70f82d6a711b3eb94e800baed00bb87c09eaecd.zip |
portmanager: Support item-added/net-provider (global and shared modules only!)
Diffstat (limited to 'core')
-rw-r--r-- | core/portmanager.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua index 30597628..2870815c 100644 --- a/core/portmanager.lua +++ b/core/portmanager.lua @@ -52,6 +52,15 @@ end module("portmanager", package.seeall); +prosody.events.add_handler("item-added/net-provider", function (event) + local item = event.item; + register_service(item.name, item); +end); +prosody.events.add_handler("item-removed/net-provider", function (event) + local item = event.item; + unregister_service(item.name, item); +end); + --- Public API function activate_service(service_name) |