# HG changeset patch # User Matthew Wild # Date 1331761328 0 # Node ID 171051f9dd000684b3e8d69822114c7ea28b9415 # Parent 83a5377ffea2c81927d2704726d2d2fd86ff37f5 mod_c2s: Use module:add_item() to add the net-provider for portmanager diff -r 83a5377ffea2 -r 171051f9dd00 plugins/mod_c2s.lua --- a/plugins/mod_c2s.lua Wed Mar 14 21:40:14 2012 +0000 +++ b/plugins/mod_c2s.lua Wed Mar 14 21:42:08 2012 +0000 @@ -220,13 +220,15 @@ sessions[conn] = session; end -portmanager.register_service("c2s", { +module:add_item("net-provider", { + name = "c2s"; listener = listener; default_port = 5222; encryption = "starttls"; }); -portmanager.register_service("legacy_ssl", { +module:add_item("net-provider", { + name = "legacy_ssl"; listener = listener; encryption = "ssl"; }); diff -r 83a5377ffea2 -r 171051f9dd00 plugins/s2s/mod_s2s.lua --- a/plugins/s2s/mod_s2s.lua Wed Mar 14 21:40:14 2012 +0000 +++ b/plugins/s2s/mod_s2s.lua Wed Mar 14 21:42:08 2012 +0000 @@ -467,7 +467,8 @@ s2sout.set_listener(listener); -require "core.portmanager".register_service("s2s", { +module:add_item("net-provider", { + name = "s2s"; listener = listener; default_port = 5269; encryption = "starttls";