Changeset

4540:ddce5b1bdfca

mod_admin_telnet: Use module:shared() to expose commands table and default console environment
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Jan 2012 19:50:08 +0000
parents 4539:3cbfa768eb06
children 4541:05f5ec99da77
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sun Jan 22 19:48:53 2012 +0000
+++ b/plugins/mod_admin_telnet.lua	Sun Jan 22 19:50:08 2012 +0000
@@ -21,12 +21,10 @@
 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)