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 | 38859b26f93776a9f105953b4b05312194202b4d (patch) | |
tree | 823cfb0a4a1bddd2de2cc8fca191f28183873a75 /plugins | |
parent | 925ea11f71ab1794a727d0a4563fea50e4d94e53 (diff) | |
download | prosody-38859b26f93776a9f105953b4b05312194202b4d.tar.gz prosody-38859b26f93776a9f105953b4b05312194202b4d.zip |
mod_admin_telnet: Port to portmanager
Diffstat (limited to 'plugins')
-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; +}); |