Mercurial > prosody-hg
diff prosody @ 2428:3ba9db4b9311
prosody: Read list of possible config extensions from configmanager, removes old TODO
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 09 Jan 2010 07:03:48 +0000 |
| parents | 0bd8408a491c |
| children | 5cfa1400e247 |
line wrap: on
line diff
--- a/prosody Sat Jan 09 06:59:47 2010 +0000 +++ b/prosody Sat Jan 09 07:03:48 2010 +0000 @@ -64,8 +64,6 @@ -- functions get called function read_config() - -- TODO: Check for other formats when we add support for them - -- Use lfs? Make a new conf/ dir? local filenames = {}; local filename; @@ -75,7 +73,9 @@ table.insert(filenames, CFG_CONFIGDIR.."/"..arg[2]); end else - table.insert(filenames, (CFG_CONFIGDIR or ".").."/prosody.cfg.lua"); + for _, format in ipairs(config.parsers()) do + table.insert(filenames, (CFG_CONFIGDIR or ".").."/prosody.cfg."..format); + end end for _,_filename in ipairs(filenames) do filename = _filename;
