From 3b85690aa6d9c14bb926692e25cc4480b85200ab Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 11 Jan 2025 23:58:05 +0800 Subject: config: add exec(-onec) with rules and execr(-once) (#8953) --- src/config/ConfigManager.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/config/ConfigManager.hpp') diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 53772401..a27ee7ab 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -132,6 +132,11 @@ struct SConfigOptionDescription { std::variant data; }; +struct SFirstExecRequest { + std::string exec = ""; + bool withRules = false; +}; + class CConfigManager { public: CConfigManager(); @@ -196,7 +201,9 @@ class CConfigManager { // keywords std::optional handleRawExec(const std::string&, const std::string&); + std::optional handleExec(const std::string&, const std::string&); std::optional handleExecOnce(const std::string&, const std::string&); + std::optional handleExecRawOnce(const std::string&, const std::string&); std::optional handleExecShutdown(const std::string&, const std::string&); std::optional handleMonitor(const std::string&, const std::string&); std::optional handleBind(const std::string&, const std::string&); @@ -280,7 +287,8 @@ class CConfigManager { bool firstExecDispatched = false; bool m_bManualCrashInitiated = false; - std::vector firstExecRequests; + + std::vector firstExecRequests; // bool is for if with rules std::vector finalExecRequests; std::vector> m_vFailedPluginConfigValues; // for plugin values of unloaded plugins -- cgit v1.2.3