summaryrefslogtreecommitdiff
path: root/include/configparser.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-01-07 11:36:34 +0000
committerSadie Powell <sadie@witchery.services>2021-01-07 11:53:58 +0000
commit8d6b550e0b30983886dc240fd3261fae786d5693 (patch)
treef5c365271fa25bcbfc6a39ca5bb911c60dd9ffc5 /include/configparser.h
parent73a209628c3c1deeab38e94e6b4db7506e75614b (diff)
Implement support for more XML and IRC colour code escapes.
Diffstat (limited to 'include/configparser.h')
-rw-r--r--include/configparser.h22
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);