mod_console: Expose commands and environment table

Thu, 09 Jul 2009 14:41:56 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 09 Jul 2009 14:41:56 +0100
changeset 1506
2c8aa16b4f64
parent 1505
e19cb945c25b
child 1507
92357dffe743

mod_console: Expose commands and environment table

plugins/mod_console.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_console.lua	Thu Jul 09 14:37:04 2009 +0100
+++ b/plugins/mod_console.lua	Thu Jul 09 14:41:56 2009 +0100
@@ -24,6 +24,8 @@
 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

mercurial