From 236c4d0ad042cee0057c6e1b812b5eeac95fb771 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 1 May 2006 19:29:41 +0000 Subject: Ability to use the \ symbol to escape ascii values in a tag, e.g.: git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3922 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/configreader.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/configreader.cpp b/src/configreader.cpp index 4554b58b6..b7e3d24dc 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -893,7 +893,27 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const char* filename, std::o if(in_comment) continue; - + + /* XXX: Added by Brain, May 1st 2006 - Escaping of characters. + * Note that this WILL NOT usually allow insertion of newlines, + * because a newline is two characters long. Use it primarily to + * insert the " symbol. + */ + if ((ch == '\\') && in_quote && in_tag) + { + char real_character; + if (conf.get(real_character)) + { + line += real_character; + continue; + } + else + { + errorstream << "End of file after a \\, what did you want to escape?: " << filename << ":" << linenumber << std::endl; + return false; + } + } + line += ch; if(ch == '<') -- cgit v1.2.3