Comparison

plugins/mod_admin_telnet.lua @ 9753:3a14815f5430

mod_admin_telnet: Remove the long gone 'section' argument in the undocumented config:get command
author Kim Alvefur <zash@zash.se>
date Fri, 04 Jan 2019 13:38:30 +0100
parent 9748:99199b53019f
child 9754:cbbc6fefd07d
comparison
equal deleted inserted replaced
9752:5cc2765c3ce4 9753:3a14815f5430
493 return false, err or "Unknown error loading config"; 493 return false, err or "Unknown error loading config";
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, section, key) 498 function def_env.config:get(host, key)
499 local config_get = require "core.configmanager".get 499 local config_get = require "core.configmanager".get
500 return true, tostring(config_get(host, section, key)); 500 return true, tostring(config_get(host, key));
501 end 501 end
502 502
503 function def_env.config:reload() 503 function def_env.config:reload()
504 local ok, err = prosody.reload_config(); 504 local ok, err = prosody.reload_config();
505 return ok, (ok and "Config reloaded (you may need to reload modules to take effect)") or tostring(err); 505 return ok, (ok and "Config reloaded (you may need to reload modules to take effect)") or tostring(err);