Software /
code /
prosody
Diff
core/modulemanager.lua @ 1586:5c627d5d5e37
modulemanager: Added get_option(name, default_value) to plugin API
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 25 Jul 2009 18:37:05 +0500 |
parent | 1523:841d61be198f |
child | 1694:0b7888c0995d |
line wrap: on
line diff
--- a/core/modulemanager.lua Fri Jul 24 01:34:25 2009 +0100 +++ b/core/modulemanager.lua Sat Jul 25 18:37:05 2009 +0500 @@ -418,6 +418,10 @@ return f(); end +function api:get_option(name, default_value) + return config.get(self.host, self.name, name) or config.get(self.host, "core", name) or default_value; +end + -------------------------------------------------------------------- local actions = {};