Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 9754:cbbc6fefd07d
mod_admin_telnet: config:get: Assume the global section if only one argument is given
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Jan 2019 13:39:13 +0100 |
parent | 9753:3a14815f5430 |
child | 9755:fd4d516556aa |
comparison
equal
deleted
inserted
replaced
9753:3a14815f5430 | 9754:cbbc6fefd07d |
---|---|
494 end | 494 end |
495 return true, "Config loaded"; | 495 return true, "Config loaded"; |
496 end | 496 end |
497 | 497 |
498 function def_env.config:get(host, key) | 498 function def_env.config:get(host, key) |
499 if key == nil then | |
500 host, key = "*", host; | |
501 end | |
499 local config_get = require "core.configmanager".get | 502 local config_get = require "core.configmanager".get |
500 return true, tostring(config_get(host, key)); | 503 return true, tostring(config_get(host, key)); |
501 end | 504 end |
502 | 505 |
503 function def_env.config:reload() | 506 function def_env.config:reload() |