diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-05-01 19:29:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-05-01 19:29:41 +0000 |
commit | 236c4d0ad042cee0057c6e1b812b5eeac95fb771 (patch) | |
tree | d428516f39017f2eb35cf7b17dbf5ab29e0d5d08 /src/configreader.cpp | |
parent | f7b04e5d93dcbd158f117da3e5821742a74e3f38 (diff) |
Ability to use the \ symbol to escape ascii values in a tag, e.g.:
<server name="\"Bollocks\" Said pooh, as he cought his testicles in the vice!">
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3922 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
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 == '<') |