summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-09-07 05:59:28 -0400
committerAdam <Adam@anope.org>2012-09-07 05:59:28 -0400
commit3c63e44d32edcced83c88fc7d06e33d40791b781 (patch)
treeca73edc38f94ffe48b1355ac8ab8d29402add80a /src
parent02d943bfb01a5b8268c8a820756ebcb0639e1f7b (diff)
Allow ; and } in quoted strings
Diffstat (limited to 'src')
-rw-r--r--src/config.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 0ec4fb34e..a5e07596d 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -1694,9 +1694,7 @@ void ServerConfig::LoadConf(ConfigurationFile &file)
// Terminate word
in_word = false;
}
- else if (!in_word && ch == ';')
- ;
- else if (ch == '}')
+ else if (ch == ';' || ch == '}')
;
else
{
@@ -1711,6 +1709,12 @@ void ServerConfig::LoadConf(ConfigurationFile &file)
if (ch == ';' || ch == '}' || c + 1 == len)
{
+ bool eol = c + 1 == len;
+
+ if (!eol && in_quote)
+ // Allow ; and } in quoted strings
+ continue;
+
if (in_quote)
{
// Quotes can span multiple lines; all we need to do is go to the next line without clearing things