From badcf31499d8dd4023d10d623c7a7dadef254f95 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 9 Mar 2025 13:57:20 +0000 Subject: Make config variables a lot more useful. - Config variables now no longer conflict with regular values. - Config variables can now be read from the environment. (e.g. ${env.USER}). - Config variables can now be used as partial values (e.g. support@${network.domain}) --- include/config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/config.h b/include/config.h index 7d12d602d..d5fb9b91d 100644 --- a/include/config.h +++ b/include/config.h @@ -83,9 +83,14 @@ namespace Configuration struct Uplink; - struct CoreExport Conf final - : Block + class CoreExport Conf final + : public Block { + private: + /** Replaces defined variables within a string. */ + Anope::string ReplaceVars(const Anope::string &str, const File &file, int linenumber); + + public: /* options:readtimeout */ time_t ReadTimeout; /* If we should default to privmsging clients */ -- cgit