aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-07-25 18:37:05 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-07-25 18:37:05 +0500
commit8b5ca7aabb3de5e3bcbbf91629e0a3c6dd6405f4 (patch)
tree0db00baeb234c33d49512c08eaccab7f051c336f /core
parentf842b8417a1f19efd29429101a323be0331b612e (diff)
downloadprosody-8b5ca7aabb3de5e3bcbbf91629e0a3c6dd6405f4.tar.gz
prosody-8b5ca7aabb3de5e3bcbbf91629e0a3c6dd6405f4.zip
modulemanager: Added get_option(name, default_value) to plugin API
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 0c9ef581..c2e6e68e 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -418,6 +418,10 @@ function api:require(lib)
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 = {};