aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-01-22 19:50:08 +0000
committerMatthew Wild <mwild1@gmail.com>2012-01-22 19:50:08 +0000
commit075f0cbd7c732c108e03ec8596e9934db7b8b06a (patch)
tree4e3b9e41d51b98f45f28c8ea471c03238b2d18b7 /plugins
parentbefc1f6162b68bdd6cdbdb9a35cdad9fc39de31f (diff)
downloadprosody-075f0cbd7c732c108e03ec8596e9934db7b8b06a.tar.gz
prosody-075f0cbd7c732c108e03ec8596e9934db7b8b06a.zip
mod_admin_telnet: Use module:shared() to expose commands table and default console environment
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_telnet.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index b211d271..b118e27a 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -21,12 +21,10 @@ local jid_bare = require "util.jid".bare;
local set, array = require "util.set", require "util.array";
local cert_verify_identity = require "util.x509".verify_identity;
-local commands = {};
-local def_env = {};
+local commands = module:shared("commands")
+local def_env = module:shared("env");
local default_env_mt = { __index = def_env };
-prosody.console = { commands = commands, env = def_env };
-
local function redirect_output(_G, session)
local env = setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end });
env.dofile = function(name)