diff options
| author | 2021-01-07 13:13:58 +0000 | |
|---|---|---|
| committer | 2021-01-07 13:13:58 +0000 | |
| commit | 4f68d162cc55a8e35f9800a2ab85274876061861 (patch) | |
| tree | 8de0f196ab3447614a6481f9b356e5dc2bae5a27 /include/configparser.h | |
| parent | Add a function for shrinking module names. (diff) | |
| parent | Implement support for more XML and IRC colour code escapes. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'include/configparser.h')
| -rw-r--r-- | include/configparser.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/configparser.h b/include/configparser.h index 6a5428b13..e88d3039d 100644 --- a/include/configparser.h +++ b/include/configparser.h @@ -33,9 +33,27 @@ struct ParseStack ParseStack(ServerConfig* conf) : output(conf->config_data), FilesOutput(conf->Files), errstr(conf->errstr) { - vars["amp"] = "&"; + // Special character escapes. + vars["newline"] = "\n"; + vars["nl"] = "\n"; + + // XML escapes. + vars["amp"] = "&"; + vars["apos"] = "'"; + vars["gt"] = ">"; + vars["lt"] = "<"; vars["quot"] = "\""; - vars["newline"] = vars["nl"] = "\n"; + + // IRC formatting codes. + vars["irc.bold"] = "\x02"; + vars["irc.color"] = "\x03"; + vars["irc.colour"] = "\x03"; + vars["irc.italic"] = "\x1D"; + vars["irc.monospace"] = "\x11"; + vars["irc.reset"] = "\x0F"; + vars["irc.reverse"] = "\x16"; + vars["irc.strikethrough"] = "\x1E"; + vars["irc.underline"] = "\x1F"; } bool ParseFile(const std::string& name, int flags, const std::string& mandatory_tag = std::string(), bool isexec = false); void DoInclude(std::shared_ptr<ConfigTag> includeTag, int flags); |
