Software /
code /
prosody
Changeset
4550:1c41e4a846a2
mod_admin_telnet: Port to portmanager
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 23 Jan 2012 01:05:32 +0000 |
parents | 4549:15fe442e70c5 |
children | 4551:8f25f3b1c62f |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Mon Jan 23 01:04:15 2012 +0000 +++ b/plugins/mod_admin_telnet.lua Mon Jan 23 01:05:32 2012 +0000 @@ -12,9 +12,8 @@ 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 @@ end end -connlisteners_register('console', console_listener); - -- Console commands -- -- These are simple commands, not valid standalone in Lua @@ -776,4 +773,7 @@ end end -prosody.net_activate_ports("console", "console", {5582}, "tcp"); +require "core.portmanager".register_service("console", { + listener = console_listener; + default_port = 5582; +});