summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-08-20 20:17:04 -0400
committerAdam <Adam@anope.org>2017-08-20 20:17:04 -0400
commit623755dfebd5123aa27a02484db0fd320c61d036 (patch)
treec9b99627b1ce12e1e469baefbb6e4636cec2dc73 /include
parentf90b2dc3dbdb79a50933a0034b2339693615b02a (diff)
Add support for envvars in the config
Diffstat (limited to 'include')
-rw-r--r--include/anope.h5
-rw-r--r--include/config.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/include/anope.h b/include/anope.h
index 0b22584ef..a6bad8e5b 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -552,6 +552,11 @@ namespace Anope
*/
extern CoreExport Anope::string Random(size_t len);
+ /** Replace ${VARIABLE} or ${VARIABLE:-default} in a string with
+ * the appropriate environment variables
+ */
+ extern CoreExport Anope::string ProcessEnvVars(const Anope::string &);
+
extern Logger Logger;
}
diff --git a/include/config.h b/include/config.h
index b020b1902..0f70bb54d 100644
--- a/include/config.h
+++ b/include/config.h
@@ -168,6 +168,8 @@ namespace Configuration
void ApplyBots();
void LoadOpers();
+
+ static void ProcessEnvVars(Block *);
};
struct Uplink