aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-09 14:41:56 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-09 14:41:56 +0100
commit7fcac49c78dcb09aa2774768f02ad1bb2388bf13 (patch)
treef02f8a04cb8f437bd408adc0c5209a05cb6b6e12 /plugins/mod_console.lua
parentb20127b81a64bf5432ed21d7464b53c2995b8af2 (diff)
downloadprosody-7fcac49c78dcb09aa2774768f02ad1bb2388bf13.tar.gz
prosody-7fcac49c78dcb09aa2774768f02ad1bb2388bf13.zip
mod_console: Expose commands and environment table
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 8d87655d..4414ba80 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -24,6 +24,8 @@ local commands = {};
local def_env = {};
local default_env_mt = { __index = def_env };
+prosody.console = { commands = commands, env = def_env };
+
local function redirect_output(_G, session)
return setmetatable({ print = session.print }, { __index = function (t, k) return rawget(_G, k); end, __newindex = function (t, k, v) rawset(_G, k, v); end });
end