aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-01-23 01:05:32 +0000
committerMatthew Wild <mwild1@gmail.com>2012-01-23 01:05:32 +0000
commit38859b26f93776a9f105953b4b05312194202b4d (patch)
tree823cfb0a4a1bddd2de2cc8fca191f28183873a75
parent925ea11f71ab1794a727d0a4563fea50e4d94e53 (diff)
downloadprosody-38859b26f93776a9f105953b4b05312194202b4d.tar.gz
prosody-38859b26f93776a9f105953b4b05312194202b4d.zip
mod_admin_telnet: Port to portmanager
-rw-r--r--plugins/mod_admin_telnet.lua10
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;
+});