aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-01-04 13:39:13 +0100
committerKim Alvefur <zash@zash.se>2019-01-04 13:39:13 +0100
commitce8379079e7e0fae9b292a7a8ce6ddd91a4f6e46 (patch)
treef7ea9a22ecb4920bfaf608b58c904d5bc963a1b5
parent1271c21c89d544ad3d34526f9317c952092c0658 (diff)
downloadprosody-ce8379079e7e0fae9b292a7a8ce6ddd91a4f6e46.tar.gz
prosody-ce8379079e7e0fae9b292a7a8ce6ddd91a4f6e46.zip
mod_admin_telnet: config:get: Assume the global section if only one argument is given
-rw-r--r--plugins/mod_admin_telnet.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 4c049b95..c6b67b95 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -496,6 +496,9 @@ function def_env.config:load(filename, format)
end
function def_env.config:get(host, key)
+ if key == nil then
+ host, key = "*", host;
+ end
local config_get = require "core.configmanager".get
return true, tostring(config_get(host, key));
end