From 07a0369b74f60c65afb0fd9e187b8a80f30c4dcf Mon Sep 17 00:00:00 2001
From: jcorporation <mail@jcgames.de>
Date: Tue, 27 Sep 2022 17:47:01 +0200
Subject: [PATCH] Add pcre status to config response

---
 doc/protocol.rst              | 1 +
 src/command/OtherCommands.cxx | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/doc/protocol.rst b/doc/protocol.rst
index 70d953f1c..0257cc68e 100644
--- a/doc/protocol.rst
+++ b/doc/protocol.rst
@@ -1600,6 +1600,7 @@ Reflection
 
     - ``music_directory``: The absolute path of the music directory.
     - ``playlist_directory``: The absolute path of the playlist directory.
+    - ``pcre``: Indicates pcre support.
 
 .. _command_commands:
 
diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx
index c19409406..2e1f0ce2d 100644
--- a/src/command/OtherCommands.cxx
+++ b/src/command/OtherCommands.cxx
@@ -395,6 +395,10 @@ handle_config(Client &client, [[maybe_unused]] Request args, Response &r)
 	if (const auto spl_path = map_spl_path(); !spl_path.IsNull())
 		r.Fmt(FMT_STRING("playlist_directory: {}\n"), spl_path.ToUTF8());
 
+#ifdef HAVE_PCRE
+	r.Write("pcre: 1\n");
+#endif
+
 	return CommandResult::OK;
 }