diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-02 16:47:25 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-02 16:47:25 +0000 |
commit | f2256deeefe9a9f57f6f6b902604c01138ad16cc (patch) | |
tree | 2180cffd6bec0487e3d8b5a7d5894b258782e39c /include/configparser.h | |
parent | f288993a85681c09e3d92d8c3ab9742826923e99 (diff) |
Executable include for MOTD and more
This introduces an <execfiles> 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
Diffstat (limited to 'include/configparser.h')
-rw-r--r-- | include/configparser.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<std::string> reading; std::map<std::string, std::string> 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 */ |