From 8b5ca7aabb3de5e3bcbbf91629e0a3c6dd6405f4 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 25 Jul 2009 18:37:05 +0500 Subject: modulemanager: Added get_option(name, default_value) to plugin API --- core/modulemanager.lua | 4 ++++ 1 file changed, 4 insertions(+) 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 = {}; -- cgit v1.2.3