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
commit5fb717bbcec4af6aee2bc709f97fbea7b88f3fe6 (patch)
treef7ea9a22ecb4920bfaf608b58c904d5bc963a1b5
parent11b2a79872902ae26905c006a2171aaecbcb4300 (diff)
downloadprosody-5fb717bbcec4af6aee2bc709f97fbea7b88f3fe6.tar.gz
prosody-5fb717bbcec4af6aee2bc709f97fbea7b88f3fe6.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