diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-01-23 01:05:32 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-01-23 01:05:32 +0000 |
commit | 7a2a2a4cd7a54945df1a849af7f37a9a91783d53 (patch) | |
tree | 823cfb0a4a1bddd2de2cc8fca191f28183873a75 | |
parent | 8f2788502ce4f0351ed411d41d8a5ea34904bfee (diff) | |
download | prosody-7a2a2a4cd7a54945df1a849af7f37a9a91783d53.tar.gz prosody-7a2a2a4cd7a54945df1a849af7f37a9a91783d53.zip |
mod_admin_telnet: Port to portmanager
-rw-r--r-- | plugins/mod_admin_telnet.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index b118e27a..9e9065bb 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -12,9 +12,8 @@ local _G = _G; local prosody = _G.prosody; local hosts = prosody.hosts; -local connlisteners_register = require "net.connlisteners".register; -local console_listener = { default_port = 5582; default_mode = "*l"; default_interface = "127.0.0.1" }; +local console_listener = { default_port = 5582; default_mode = "*l"; interface = "127.0.0.1" }; require "util.iterators"; local jid_bare = require "util.jid".bare; @@ -147,8 +146,6 @@ function console_listener.ondisconnect(conn, err) end end -connlisteners_register('console', console_listener); - -- Console commands -- -- These are simple commands, not valid standalone in Lua @@ -776,4 +773,7 @@ if option and option ~= "short" and option ~= "full" and option ~= "graphic" the end end -prosody.net_activate_ports("console", "console", {5582}, "tcp"); +require "core.portmanager".register_service("console", { + listener = console_listener; + default_port = 5582; +}); |