aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-05-07 16:10:04 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-05-07 16:10:04 +0500
commitc43b31011fc3d488b33945f64c0362666ca96913 (patch)
treedd6a3379369fc5e80de00bba0a10b5c97fa7764d /plugins
parent4e7390dbf9737743951100238a77edcf3f22f1e1 (diff)
downloadprosody-c43b31011fc3d488b33945f64c0362666ca96913.tar.gz
prosody-c43b31011fc3d488b33945f64c0362666ca96913.zip
mod_console: Set a chunk name for loadstring calls (nicer errors).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_console.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index ab1d3453..a33302d9 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -84,9 +84,10 @@ function console_listener.listener(conn, data)
session.env._ = data;
- local chunk, err = loadstring("return "..data);
+ local chunkname = "=console";
+ local chunk, err = loadstring("return "..data, chunkname);
if not chunk then
- chunk, err = loadstring(data);
+ chunk, err = loadstring(data, chunkname);
if not chunk then
err = err:gsub("^%[string .-%]:%d+: ", "");
err = err:gsub("^:%d+: ", "");