aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/portmanager.lua9
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)