diff options
author | Sadie Powell <sadie@witchery.services> | 2021-01-07 11:36:34 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-01-07 11:53:58 +0000 |
commit | 8d6b550e0b30983886dc240fd3261fae786d5693 (patch) | |
tree | f5c365271fa25bcbfc6a39ca5bb911c60dd9ffc5 | |
parent | 73a209628c3c1deeab38e94e6b4db7506e75614b (diff) |
Implement support for more XML and IRC colour code escapes.
-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 632679218..9fb66675f 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(ConfigTag* includeTag, int flags); |