From f2256deeefe9a9f57f6f6b902604c01138ad16cc Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 2 Feb 2010 16:47:25 +0000 Subject: Executable include for MOTD and more This introduces an tag that reads files from the output of a command, in the same way as executable includes. The files specified here can also be used anywhere a file is used (opermotd, randquote, etc) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12354 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/configparser.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/configparser.h') diff --git a/include/configparser.h b/include/configparser.h index 3240ff5f9..1054b1f7f 100644 --- a/include/configparser.h +++ b/include/configparser.h @@ -22,10 +22,11 @@ struct ParseStack std::vector reading; std::map vars; ConfigDataHash& output; + ConfigFileCache& FilesOutput; std::stringstream& errstr; ParseStack(ServerConfig* conf) - : output(conf->config_data), errstr(conf->errstr) + : output(conf->config_data), FilesOutput(conf->Files), errstr(conf->errstr) { vars["amp"] = "&"; vars["quot"] = "\""; @@ -34,6 +35,7 @@ struct ParseStack bool ParseFile(const std::string& name, int flags); bool ParseExec(const std::string& name, int flags); void DoInclude(ConfigTag* includeTag, int flags); + void DoReadFile(const std::string& key, const std::string& file, int flags, bool exec); }; /** RAII wrapper on FILE* to close files on exceptions */ -- cgit v1.2.3