summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-17 15:33:36 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-17 15:33:36 +0000
commit8831a187362bb9fd4e0f4c34e808868adf90fe56 (patch)
treef145e129415dcdf88ead439d295af59e998477b9 /src
parentda1ef778475721f5cbcc73417fa730621d53af5b (diff)
Allow putting newlines into quoted values in the config using \n. I'm coming to a use for this.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5272 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 293cf9964..30e966b94 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -904,6 +904,8 @@ bool ServerConfig::LoadConf(ConfigDataHash &target, const char* filename, std::o
if (conf.get(real_character))
{
ServerInstance->Log(DEBUG,"Escaping %c", real_character);
+ if (real_character == 'n')
+ real_character = '\n';
line += real_character;
continue;
}
@@ -1068,7 +1070,10 @@ bool ServerConfig::ParseLine(ConfigDataHash &target, std::string &line, long lin
if ((*c == '\\') && (in_quote))
{
c++;
- current_value += *c;
+ if (*c == 'n')
+ current_value += '\n';
+ else
+ current_value += *c;
continue;
}
if (*c == '"')