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 | 1ab1ddd3ee3f8a93b2d48d6a93840ea1ddaa6cb9 (patch) | |
tree | e38add20b859812d3e4fd775e70b586d7679099a /core/portmanager.lua | |
parent | 88ea07a5ef72ee7d65d8e35a40186c7cd169cd41 (diff) | |
download | prosody-1ab1ddd3ee3f8a93b2d48d6a93840ea1ddaa6cb9.tar.gz prosody-1ab1ddd3ee3f8a93b2d48d6a93840ea1ddaa6cb9.zip |
portmanager: Support item-added/net-provider (global and shared modules only!)
Diffstat (limited to 'core/portmanager.lua')
-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) |